//util_pop_video_0bb4bc1
_.Module.define({
	path: "ueglib/widget/verify_manager_phone",
	requires: [],
	sub: {
		_hasNextTimeButton: null,
		_template: {
			_confirmDialog: ["<h2>", "#{title}", "</h2>", "<p>", "#{text}", "</p>"].join(""),
			_changeBind: ["<div>* \u5982\u60a8\u9700\u8981\u6362\u7ed1\u60a8\u7684\u624b\u673a\u540e\u518d\u8fdb\u884c\u7ed1\u5b9a\u9a8c\u8bc1\uff0c\u8bf7<a target='_blank' href='#{href}'>\u70b9\u6b64\u6362\u7ed1</a>\u3002</div>"].join(""),
			_complain: ["<div>* \u5982\u679c\u60a8\u7533\u8bc9\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u95ee\u9898\u5bfc\u81f4\u65e0\u6cd5\u9a8c\u8bc1\uff0c\u8bf7<a target='_blank' href='#{href}'>\u70b9\u6b64\u4e13\u8d34</a>\u53cd\u9988\u3002</div>"].join("")
		},
		_url: {
			nextTime: "/bawu2/checkphone/commitActsctrl",
			getPopPassData: "/bawu2/checkphone/getPhoneToken",
			verifyDone: "/bawu2/checkphone/commitCheckTime"
		},
		initial: function(t) {
			var e = this;
			e._hasNextTimeButton = !t, e._title = null, e._text = null, t ? (e._title = "\u5c0a\u656c\u7684\u8d34\u5427\u5427\u4e3b\u7528\u6237", e._text = "\u4e3a\u4e86\u60a8\u7684\u8d26\u53f7\u5b89\u5168\uff0c\u8bf7\u60a8\u8fdb\u884c\u624b\u673a\u7ed1\u5b9a\u9a8c\u8bc1\uff0c<br/>\u4ee5\u9632\u8d26\u53f7\u88ab\u76d7\u9020\u6210\u635f\u5931\u3002<span class='verify_manager_phone_tip_strong'>\uff08\u8bbe\u7f6e\u6210\u529f\u540e\u4e0d\u518d\u63d0\u793a\uff09</span>") : (e._title = "\u5c0a\u656c\u7684\u8d34\u5427\u5427\u4e3b\u7528\u6237\uff1a", e._text = "\u4e3a\u4e86\u60a8\u7684\u8d26\u53f7\u5b89\u5168\uff0c\u5f3a\u70c8\u5efa\u8bae\u60a8\u8fdb\u884c\u624b\u673a\u7ed1\u5b9a\u9a8c\u8bc1\uff0c<br/>\u4ee5\u9632\u8d26\u53f7\u88ab\u76d7\u9020\u6210\u635f\u5931\u3002<span class='verify_manager_phone_tip_strong'>\uff08\u8bbe\u7f6e\u6210\u529f\u540e\u4e0d\u518d\u63d0\u793a\uff09</span>"), e._popConfirmDialog()
		},
		_startVerify: function() {
			var t = this;
			t._getPopPassData(function(e) {
				t._popPassDialog(e.hasBind ? "verify" : "bind", e.token)
			}, function() {
				t._onVerifyFail()
			})
		},
		_onVerifyFail: function(t) {
			var e = this;
			t || (t = "\u9a8c\u8bc1\u5931\u8d25~ T_T \u8bf7\u91cd\u8bd5~~");
			var n = {
				message: "<h2>\u9a8c\u8bc1\u624b\u673a\u5931\u8d25\uff1a</h2><p>" + t + "</p>",
				holderClassName: "verify_manager_phone_dialog",
				buttons: [{
					text: "\u91cd\u8bd5",
					callback: function() {
						e._startVerify()
					}
				}, {
					text: "\u53d6\u6d88"
				}]
			};
			n.buttons[0]["class"] = "btn_default btn_left", n.buttons[1]["class"] = "btn_sub", $.tb.alert(n)
		},
		_popConfirmDialog: function() {
			function t() {
				n._startVerify()
			}

			function e() {
				n._informServerNextTime()
			}
			var n = this,
				a = {
					text: "\u4e0b\u6b21\u518d\u8bf4",
					callback: e
				};
			a["class"] = "btn_sub";
			var i = {
				text: "\u7acb\u5373\u8bbe\u7f6e",
				callback: t
			};
			i["class"] = "btn_default btn_left";
			var o = [i];
			n._hasNextTimeButton && o.push(a), $.tb.alert({
				message: $.tb.format(n._template._confirmDialog, {
					title: n._title,
					text: n._text
				}),
				holderClassName: "verify_manager_phone_dialog",
				buttons: o
			})
		},
		_getPopPassData: function(t, e) {
			var n = this;
			$.ajax({
				url: n._url.getPopPassData,
				dataType: "json",
				success: function(n) {
					n && 0 === n.errno ? t(n.data) : e()
				},
				error: e
			})
		},
		_popPassDialog: function(t, e) {
			function n(t) {
				o._informServerVerifyDone(t)
			}

			function a() {
				o._informServerVerifyDone()
			}

			function i() {
				o._onVerifyFail()
			}
			var o = this;
			"verify" === t ? o._showMobileVerify(e, a, i) : o._showMobileBind(e, n, i)
		},
		_informServerNextTime: function() {
			var t = this;
			$.ajax(t._url.nextTime)
		},
		_informServerVerifyDone: function(t) {
			var e = this,
				n = function() {
					$.tb.alert({
						message: "<h2>\u8bbe\u7f6e\u6210\u529f\uff01</h2>",
						holderClassName: "verify_manager_phone_dialog",
						onclose: function() {
							location.reload()
						},
						buttons: [{
							text: "\u786e\u8ba4"
						}]
					})
				},
				a = function() {
					e._onVerifyFail()
				},
				i = e._url.verifyDone;
			t && (i += "?bindid=" + t), $.ajax({
				url: i,
				dataType: "json",
				success: function(t) {
					t && 0 === t.errno ? n() : a()
				},
				error: a
			})
		},
		_getTimeStamp: function() {
			var t = (new Date).getTime();
			return Math.floor(t / 6e4)
		},
		_updatePassDialogZIndex: function(t) {
			var e = $(t.getById("mask")),
				n = $(t.getById("wrapper"));
			e.css("zIndex", 5e4 + parseInt(e.css("zIndex"))), n.css("zIndex", 5e4 + parseInt(n.css("zIndex")))
		}
	}
});
! function() {
	var e = !1;
	_.Module.define({
		path: "ueglib/widget/detect_manager_block",
		requires: ["ueglib/widget/verify_manager_phone"],
		sub: {
			initial: function() {},
			setBlockState: function(n) {
				e = n
			},
			getBlockState: function() {
				return e
			},
			doOnNotBlocked: function(n, t) {
				void 0 === t && (t = !0), e ? t && this.requireInstance("ueglib/widget/verify_manager_phone", [!0]) : n()
			},
			doOnBlocked: function(n) {
				e && n()
			}
		}
	})
}();
_.Module.define({
	path: "ueglib/widget/block_user",
	requires: ["ueglib/widget/detect_manager_block"],
	sub: {
		template: '<div class="block_user_wrapper"> <ul class="b_u_items">   <li class="b_u_items_outer">  <label>\u7528\u6237\u540d</label><div class="b_username" ></div> </li>  <li class="b_u_items_outer">    <label>\u5c01\u7981\u65f6\u957f:</label>  <div class="b_block_time"> <span class="b_fixed_time">1\u5929</span>   <select class="b_select_time"> <option data-info="1">1\u5929</option> <option data-info="3">3\u5929</option><option data-info="10">10\u5929</option>  </select>  </div>   </li>  <li class="b_u_items_outer"> <label>\u5c01\u7981\u539f\u56e0:</label> <div class="b_reason_box"><ul class="b_reason_ul">   <li class="b_reason_item" data-prefix="1."></li><li class="b_reason_item" data-prefix="2."></li> <li class="b_reason_item" data-prefix="3."></li>  <li class="b_reason_item" data-prefix="4."></li>  <li class="b_reason_item" data-prefix="5."></li> <li class="b_reason_item" data-prefix="6."></li>  </ul><div class="b_reason_content">    <div class="b_reason_top">   <div class="b_top_mod_bar" > <div class="b_mod_bar"><span></span>\u4fee\u6539</div>  <div class="b_del_bar"><span></span>\u5220\u9664</div>   </div><div class="b_top_save_bar">  <div class="b_save_bar"><span></span>\u4fdd\u5b58</div> <div class="b_cancel_bar"><span></span>\u53d6\u6d88</div></div>     </div>   <div class="b_reason_textarea">  <label for="b_user_textarea" class="b_label_tips">\u62b1\u6b49\uff0c\u4f60\u7684\u53d1\u8d34\u64cd\u4f5c\u6216\u53d1\u8868\u8d34\u5b50\u7684\u5185\u5bb9\u8fdd\u53cd\u4e86\u672c\u5427\u7684\u5427\u89c4\uff0c\u5df2\u7ecf\u88ab\u5c01\u7981\uff0c\u5c01\u7981\u671f\u95f4\u4e0d\u80fd\u5728\u672c\u5427\u7ee7\u7eed\u53d1\u8a00\u3002</label><textarea id="b_user_textarea" class="b_textarea"></textarea>      </div>    </div>   </div>   </li>   </ul>   <div class="block_btns">  <div class="block_tips"></div> <div class="b_id_btn">\u5c01\u7981ID</div> <div class="b_fixed_tips"></div>  </div> </div>',
		errTemplate: '<div class="block_response_info"></div> ',
		initial: function(e, t, a, o, i) {
			var n = this,
				s = n.requireInstance("ueglib/widget/detect_manager_block", []);
			s.doOnNotBlocked(function() {
				n._block(e, t, a, o, i)
			})
		},
		_block: function(e, t, a, o, i) {
			this.config = {
				block_reason_list: "/pmc/tpl",
				add_block_reason: "/pmc/tpl",
				modify_block_reason: "/pmc/tpl",
				del_block_reason: "/pmc/tpl",
				save_block_id: "/pmc/blockid"
			}, this.blockList = $.extend(!0, [], e), this.power = t, this.forum = a, this.tbs = o, this.sucCallback = i, this.user_num = this.blockList.length, this.add_new_temp = "<span>+</span>\u65b0\u5efa\u6a21\u677f", this.textarea_maxlength = 200, this.curr_pattern = "", this.$blockPopWinHtml = $(this.template), this.$responseBlockInfo = $(this.errTemplate), this.paramValidate(), this.setBlockDefaultInfo(), this.textareaKeyupEvtBind(), this.blockIDbtnEvtBind(), this.tabSwitchEvtBind(), this.textareaFocusEvtBind(), this.textareaBlurEvtBind(), this.logicalControl(), this.blockDialog.show(), this.trigger("show")
		},
		duplicateRemoval: function(e) {
			for(var t = {}, a = [], o = e.length, i = 0; o > i; i++) t[e[i]] || (a.push(e[i]), t[e[i]] = !0);
			return a
		},
		paramValidate: function() {
			var e = this;
			null === e.power.ban_id || null === e.power.ban_ip || "" === e.power.ban_id || "" === e.power.ban_ip ? (this.blockDialog = new $.dialog({
				title: "\u5c01\u7981\u63d0\u793a",
				width: "556",
				html: this.$responseBlockInfo
			}), e.$responseBlockInfo.find(".block_response_info").html("\u4f60\u6ca1\u6709\u5c01\u7981\u64cd\u4f5c\u6743\u9650\uff01")) : e.blockDialog = new $.dialog({
				title: "\u5c01\u7981\u64cd\u4f5c",
				width: "556",
				html: this.$blockPopWinHtml
			}), e.blockDialog.bind("onclose", function() {
				e.user_num > 1 && $.tb.location.reload()
			}), e.blockDialog.bind("onhide", function() {
				e.user_num > 1 && $.tb.location.reload()
			})
		},
		insertDefaultNewTemp: function() {
			var e = this,
				t = 0,
				a = 0,
				o = !1;
			if($(".b_reason_ul .b_reason_item").each(function(e, o) {
					$(o).hasClass("b_add_new_reason") || ($(o).data("reasonId") && "" != $(o).data("reasonId") && $(o).data("isBuiltinTpl") === !1 && t++, a++)
				}), 6 > t) {
				$(".b_reason_ul .b_reason_item").each(function(t, i) {
					o && $(".b_reason_ul .b_reason_item").eq(t).remove(), "" !== $(i).html().trim() || o || ($(i).tbattr("data-is-builtin-tpl", !1).tbattr("data-prefix", a), $(i).addClass("b_add_new_reason").append(e.add_new_temp), o = !0)
				});
				var i = $(".b_reason_ul .b_add_new_reason").length;
				0 == i && $(".b_reason_ul").append('<li class="b_reason_item b_add_new_reason" data-is-builtin-tpl="false" data-prefix="' + (a + 1) + '.">' + e.add_new_temp + "</li>")
			}
		},
		setTextareaVal: function() {
			var e = this;
			0 != e.$blockPopWinHtml.find(".b_reason_curr").length || e.$blockPopWinHtml.find(".b_reason_item").eq(0).hasClass("b_add_new_reason") || e.$blockPopWinHtml.find(".b_reason_item").eq(0).addClass("b_reason_curr");
			var t = e.$blockPopWinHtml.find(".b_reason_curr");
			if(t.hasClass("b_add_new_reason")) e.$blockPopWinHtml.find(".b_textarea").val("");
			else if(t.html()) {
				var a = t.html(),
					o = 2;
				t.data("prefix") >= 10 && (o = 3), e.$blockPopWinHtml.find(".b_textarea").val(a.substr(o, a.length))
			}
		},
		noReasonCantModify: function() {
			var e = 0,
				t = this;
			t.$blockPopWinHtml.find(".b_reason_item").each(function(t, a) {
				"undefined" != typeof $(a).tbattr("data-reason-id") && e++
			}), 0 == e && (t.$blockPopWinHtml.find(".b_add_new_reason").removeClass("b_reason_curr"), t.$blockPopWinHtml.find(".b_reason_top").hide(), "" == t.$blockPopWinHtml.find(".b_textarea").val() && t.$blockPopWinHtml.find(".b_label_tips").show())
		},
		setBlockReasonList: function() {
			var e = this,
				t = !1;
			$.ajax({
				url: e.config.block_reason_list,
				type: "POST",
				dataType: "json",
				data: {
					fid: e.forum.id,
					tbs: e.tbs
				},
				success: function(a) {
					if("0" == a.errno) {
						var o = a.data;
						if(0 == o.length) e.$blockPopWinHtml.find(".b_label_tips").show(), e.$blockPopWinHtml.find(".b_textarea").val(""), e.noReasonCantModify(), e.$blockPopWinHtml.find(".b_reason_item").each(function(e, t) {
							$(t).removeAttr("data-reason-id").html("")
						}), e.$blockPopWinHtml.find(".b_reason_item").removeClass("b_reason_curr");
						else {
							var i = e.$blockPopWinHtml.find(".b_reason_item").length,
								n = o.length,
								s = n - i;
							if(s > 0) {
								for(var l = i, r = ""; s > 0;) r += '<li class="b_reason_item" data-prefix="' + (l + 1) + '." ></li>', l++, s--;
								$(".b_reason_ul").append(r)
							}
							e.$blockPopWinHtml.find(".b_reason_item").each(function(a, i) {
								0 == a && (e.curr_pattern = "undefined" != typeof o[a] ? "modify" : "add"), "undefined" != typeof o[a] ? $(i).html(a + 1 + "." + o[a].template_text).tbattr("data-reason-id", o[a].template_id).tbattr("data-is-builtin-tpl", o[a].is_builtin_tpl).tbattr("data-prefix", a + 1) : $(i).html(""), $(i).hasClass("b_add_new_reason") && !t && ($(i).removeClass("b_add_new_reason"), t = !0)
							}), e.$blockPopWinHtml.find(".b_reason_item").each(function(t, a) {
								"" == $(a).html() && e.$blockPopWinHtml.find(".b_reason_item").eq(t).remove(), $(a).hasClass("b_reason_curr") && ($(a).data("isBuiltinTpl") ? $(".b_top_mod_bar .b_del_bar").hide() : $(".b_top_mod_bar .b_del_bar").show())
							})
						}(e.power.ban_id && e.power.ban_ip || e.power.can_filter_id && e.power.can_filter_ip) && e.insertDefaultNewTemp(), e.setTextareaVal()
					} else e.setResponseTips(2, "\u83b7\u53d6\u5c01\u7981\u539f\u56e0\u5217\u8868\u5931\u8d25!")
				},
				error: function(t) {
					e.setNewDialogRespTips(2, t)
				}
			})
		},
		setBlockDefaultInfo: function() {
			for(var e = this, t = [], a = 0; a < e.blockList.length; ++a) - 1 === $.inArray(e.blockList[a].username, t) && t.push(e.blockList[a].username);
			t = t.join(), e.$blockPopWinHtml.find(".b_username").html($.tb.subByte(t, 30, "\u2026")), e.setBlockReasonList()
		},
		textareaKeyupEvtBind: function() {
			var e = this;
			e.$blockPopWinHtml.find(".b_textarea").on("keyup", function() {
				var t = $(this).val(),
					a = $.tb.getByteLength(t),
					o = e.$blockPopWinHtml.find(".block_tips");
				o.css({
					display: "block"
				}), e.textarea_maxlength - a > 0 ? ($(this).hasClass("input_right_pattern") || $(this).addClass("input_right_pattern"), $(this).removeClass("input_error_pattern"), o.html("\u8fd8\u53ef\u8f93\u5165" + parseInt((e.textarea_maxlength - a) / 2) + "\u5b57").addClass("b_green")) : ($(this).hasClass("input_error_pattern") || $(this).addClass("input_error_pattern"), $(this).removeClass("input_right_pattern"), o.removeClass("b_green").addClass("b_red").html("\u5df2\u8d85\u51fa" + parseInt(parseInt((a - e.textarea_maxlength) / 2) + 1) + "\u5b57"))
			})
		},
		textareaFocusEvtBind: function() {
			var e = this;
			e.$blockPopWinHtml.on("focus.showEditor", ".b_textarea", function() {
				e.curr_pattern = "add", e.toogleToolBar(), e.$blockPopWinHtml.find(".block_tips").html("").removeClass("b_red,b_green"), e.$blockPopWinHtml.find(".b_label_tips").css({
					display: "none"
				}), e.power.ban_id && e.power.ban_ip || e.power.can_filter_id && e.power.can_filter_ip ? e.$blockPopWinHtml.find(".b_reason_top").show() : e.$blockPopWinHtml.find(".b_reason_top").hide()
			})
		},
		textareaBlurEvtBind: function() {
			var e = this;
			e.$blockPopWinHtml.on("click", function(t) {
				var a = $(t.target);
				if(0 == a.closest(".b_reason_box").length) {
					e.curr_pattern = "modify", e.toogleToolBar(), 0 == e.$blockPopWinHtml.find(".b_reason_curr").length && e.$blockPopWinHtml.find(".b_reason_top").hide();
					var o = "undefined" == e.power.can_filter_id ? !e.power.ban_id || !e.power.ban_ip : !e.power.can_filter_id || !e.power.can_filter_ip;
					o && ("" == e.$blockPopWinHtml.find(".b_textarea").val() ? e.$blockPopWinHtml.find(".b_label_tips").show() : e.$blockPopWinHtml.find(".b_label_tips").hide()), e.$blockPopWinHtml.find(".block_tips").html(""), e.noReasonCantModify()
				}
			})
		},
		modifyTextareaCon: function() {
			var e = this;
			e.$blockPopWinHtml.find(".b_mod_bar").on("click", function() {
				e.$blockPopWinHtml.find(".b_textarea").trigger("focus")
			})
		},
		deleteTextareaCon: function() {
			var e = this;
			e.$blockPopWinHtml.find(".b_del_bar").on("click", function() {
				if("undefined" == typeof e.$blockPopWinHtml.find(".b_reason_curr").tbattr("data-reason-id") || e.$blockPopWinHtml.find(".b_reason_curr").hasClass("b_add_new_reason") || e.$blockPopWinHtml.find(".b_reason_curr").data("isBuiltinTpl")) return !1;
				var t = {
					op: "del",
					id: e.$blockPopWinHtml.find(".b_reason_curr").tbattr("data-reason-id"),
					fid: e.forum.id,
					tbs: e.tbs
				};
				$.ajax({
					url: e.config.del_block_reason,
					type: "POST",
					dataType: "json",
					data: t,
					success: function(t) {
						"0" == t.errno ? (e.$blockPopWinHtml.find(".b_reason_curr").removeAttr("data-reason-id"), e.setBlockReasonList(), e.setResponseTips(1, "\u5220\u9664\u6210\u529f\uff01")) : e.setResponseTips(2, "\u5220\u9664\u5931\u8d25!")
					},
					error: function(t) {
						e.setNewDialogRespTips(2, t)
					}
				})
			})
		},
		toogleToolBar: function() {
			var e = this;
			e.power.ban_id && e.power.ban_ip || e.power.can_filter_id && e.power.can_filter_ip ? (e.$blockPopWinHtml.find(".b_reason_top").css({
				display: "block"
			}), "modify" == this.curr_pattern ? (e.$blockPopWinHtml.find(".b_top_mod_bar").css({
				display: "block"
			}), e.$blockPopWinHtml.find(".b_top_save_bar").css({
				display: "none"
			})) : "add" == this.curr_pattern && (e.$blockPopWinHtml.find(".b_top_mod_bar").css({
				display: "none"
			}), e.$blockPopWinHtml.find(".b_top_save_bar").css({
				display: "block"
			}))) : e.$blockPopWinHtml.find(".b_reason_top").css({
				display: "none"
			})
		},
		saveTextareaCon: function() {
			var e, t = this,
				a = {},
				o = t.$blockPopWinHtml.find(".b_textarea");
			t.$blockPopWinHtml.find(".b_save_bar").on("click", function() {
				if(!t.checkCanbeBlocked()) return !1;
				var i = t.$blockPopWinHtml.find(".b_reason_curr").hasClass("b_add_new_reason") || 0 == t.$blockPopWinHtml.find(".b_reason_curr").length;
				i ? (a = {
					op: "add",
					tbs: t.tbs,
					fid: t.forum.id,
					ie: "gbk",
					text: $.tb.escapeHTML(o.val())
				}, e = t.config.add_block_reason) : (a = {
					op: "update",
					tbs: t.tbs,
					fid: t.forum.id,
					ie: "gbk",
					text: $.tb.escapeHTML(t.$blockPopWinHtml.find(".b_textarea").val()),
					id: t.$blockPopWinHtml.find(".b_reason_curr").tbattr("data-reason-id")
				}, e = t.config.modify_block_reason), $.ajax({
					url: e,
					type: "POST",
					dataType: "json",
					data: a,
					success: function(e) {
						t.curr_pattern = "modify", t.toogleToolBar(), "0" == e.errno ? (t.setBlockReasonList(), t.setResponseTips(1, "\u4fdd\u5b58\u6210\u529f\uff01"), i ? $.stats.track("AddReasonItem", "uegCount", "bawuAppeal", "success") : $.stats.track("modifyReasonItem" + $(".b_reason_curr").index(), "uegCount", "bawuAppeal", "success")) : t.setResponseTips(2, "\u4fdd\u5b58\u5931\u8d25!")
					},
					error: function(e) {
						t.setNewDialogRespTips(2, e)
					}
				})
			})
		},
		cancelTextareaCon: function() {
			var e = this;
			e.$blockPopWinHtml.find(".b_cancel_bar").on("click", function() {
				e.setTextareaVal(), e.curr_pattern = "modify", e.toogleToolBar(), e.$blockPopWinHtml.find(".b_reason_curr").hasClass("b_add_new_reason") && e.$blockPopWinHtml.find(".b_reason_item").siblings().removeClass("b_reason_curr").end().eq(0).addClass("b_reason_curr")
			})
		},
		getSavesData: function(e) {
			var t = this,
				a = {};
			a.day = "block" === t.$blockPopWinHtml.find(".b_fixed_time").css("display") ? "1" : t.$blockPopWinHtml.find(".b_select_time").find("option:selected").tbattr("data-info"), a.fid = t.forum.id, a.tbs = t.tbs, a.ie = "gbk", a.user_name = [], a.pid = [];
			for(var o = 0; o < t.blockList.length; ++o) {
				var i = t.blockList[o]; - 1 === $.inArray(i.username, a.user_name) && a.user_name.push($.tb.escapeHTML(i.username)), i.pid && a.pid.push(i.pid)
			}
			var n = t.$blockPopWinHtml.find(".b_textarea"),
				s = 0;
			return t.$blockPopWinHtml.find(".b_reason_item").each(function(e, t) {
				"undefined" == typeof $(t).tbattr("data-reason-id") && s++
			}), a.reason = 6 == s && "" === n.val().trim() ? t.$blockPopWinHtml.find(".b_label_tips").html() : t.$blockPopWinHtml.find(".b_textarea").val(), a.reason = $.tb.escapeHTML(a.reason), 2 === e && (a.ip = "1"), a
		},
		checkCanbeBlocked: function() {
			var e = this,
				t = e.$blockPopWinHtml.find(".b_textarea"),
				a = 0;
			return t.hasClass("input_error_pattern") || "" === t.val().trim() ? (e.$blockPopWinHtml.find(".b_reason_item").each(function(e, t) {
				"undefined" == typeof $(t).tbattr("data-reason-id") && a++
			}), 6 == a ? !0 : (e.$blockPopWinHtml.find(".b_textarea").trigger("focus"), t.hasClass("input_error_pattern") ? e.setResponseTips(2, "\u5c01\u7981\u539f\u56e0\u4e0d\u80fd\u8d85\u51fa100\u5b57") : e.setResponseTips(2, "\u5c01\u7981\u539f\u56e0\u4e0d\u80fd\u4e3a\u7a7a"), !1)) : !0
		},
		blockIDbtnEvtBind: function() {
			var e = this;
			e.$blockPopWinHtml.find(".b_id_btn").on("click", function() {
				if(!e.checkCanbeBlocked()) return !1;
				var t = e.getSavesData(1),
					a = function(o) {
						t = o ? $.extend(t, o) : t, $.ajax({
							url: e.config.save_block_id,
							type: "POST",
							dataType: "json",
							data: t,
							success: function(t) {
								1990055 === t.errno ? $.tb.checkRealName() : "0" == t.errno ? (e.setNewDialogRespTips(1, "\u5c01\u7981\u6210\u529f\uff01"), (e.sucCallback || "function" == typeof e.sucCallback) && e.sucCallback()) : 224011 == t.errno ? e.getCaptcha(t, a, e) : e.setNewDialogRespTips(2, "\u5c01\u7981\u5931\u8d25\uff01")
							},
							error: function(t) {
								e.setNewDialogRespTips(2, t)
							}
						})
					};
				a()
			})
		},
		getCaptcha: function(e, t, a) {
			var o = this;
			a = a || o;
			var i = PageData.forum.name,
				n = PageData.forum.id;
			this.requireInstanceAsync("common/component/CaptchaDialog", [{
				title: "\u5c01\u7981",
				message: "\u5c01\u7981\u4e86\u90a3\u4e48\u591a\u4eba\uff0c\u8f93\u4e2a\u7801\u9a8c\u8bc1\u4e0b\u8eab\u4efd\u5427~",
				vCode: e.res.captcha_vcode_str,
				vCodeType: e.res.captcha_code_type,
				forumName: i,
				forumId: n,
				postType: "thread",
				paramsCallback: function() {
					return {}
				}
			}], function(e) {
				o.captchaDialog = e, e.bind("onclose", function() {
					return e.hide(), !1
				}), e.bind("onaccept", function() {
					var o = {
						vcode: e.getInputValue(),
						vcode_md5: e.getVCode()
					};
					t.call(a, o)
				}), e.show()
			})
		},
		setResponseTips: function(e, t) {
			var a = this,
				o = a.$blockPopWinHtml.find(".block_tips");
			1 == e ? o.removeClass("b_red").addClass("b_green").html(t) : o.removeClass("b_green").addClass("b_red").html(t), window.setTimeout(function() {
				o.hasClass("b_green") && o.html("")
			}, 2e3)
		},
		setNewDialogRespTips: function(e, t) {
			var a = this,
				o = a.$blockPopWinHtml;
			o.html(a.$responseBlockInfo), 1 == e ? o.find(".block_response_info").removeClass("b_red").addClass("b_green").html(t) : o.find(".block_response_info").removeClass("b_green").addClass("b_red").html(t), window.setTimeout(function() {
				a.blockDialog.hide(), a.user_num > 1 && $.tb.location.reload(), a.trigger("hide")
			}, 2e3)
		},
		tabSwitchEvtBind: function() {
			var e = this;
			e.$blockPopWinHtml.on("click", ".b_reason_item", function() {
				return $(this).data("isBuiltinTpl") ? $(".b_top_mod_bar .b_del_bar").hide() : $(".b_top_mod_bar .b_del_bar").show(), "undefined" != typeof $(this).tbattr("data-reason-id") || $(this).hasClass("b_add_new_reason") ? ("none" == e.$blockPopWinHtml.find(".b_reason_top").css("display") && e.$blockPopWinHtml.find(".b_reason_top").css({
					display: "block"
				}), $(this).siblings(".b_reason_item").removeClass("b_reason_curr").end().addClass("b_reason_curr"), $(this).hasClass("b_add_new_reason") ? (e.curr_pattern = "add", e.$blockPopWinHtml.find(".b_textarea").trigger("focus")) : (e.curr_pattern = "modify", $.stats.track("reasonItem" + $(this).index(), "uegCount", "bawuAppeal", "click")), e.setTextareaVal(), e.toogleToolBar(), void 0) : !1
			})
		},
		logicalControl: function() {
			var e = this,
				t = e.$blockPopWinHtml.find(".b_fixed_time"),
				a = e.$blockPopWinHtml.find(".b_select_time");
			e.$blockPopWinHtml.find(".b_reason_item").eq(0).addClass("b_reason_curr"), e.power.ban_id && e.power.ban_ip || e.power.can_filter_id && e.power.can_filter_ip ? (e.$blockPopWinHtml.find(".b_fixed_tips").html("\u63d0\u793a\uff1a\u5927\u5427\u4e3b\u53ef\u7f16\u8f91\u539f\u56e0\u6a21\u7248\uff0c\u4fdd\u5b58\u540e\u5c0f\u5427\u4e3b\u53ef\u76f4\u63a5\u4f7f\u7528\u6587\u6848~"), e.user_num > 1 ? (t.css({
				display: "block"
			}), a.css({
				display: "none"
			})) : 1 == e.user_num && (t.css({
				display: "none"
			}), a.css({
				display: "block"
			})), e.$blockPopWinHtml.find(".b_reason_top,.b_top_mod_bar").css({
				display: "block"
			}), e.modifyTextareaCon(), e.deleteTextareaCon(), e.saveTextareaCon(), e.cancelTextareaCon()) : (e.$blockPopWinHtml.find(".b_fixed_tips").html("\u63d0\u793a\uff1a\u539f\u56e0\u6a21\u7248\u53ea\u6709\u5927\u5427\u4e3b\u53ef\u4ee5\u7f16\u8f91\uff0c\u5c0f\u5427\u4e3b\u4e5f\u53ef\u76f4\u63a5\u5728\u8f93\u5165\u6846\u4e2d\u5199\u4e0a\u5185\u5bb9\u5e76\u5b8c\u6210\u5c01\u7981~"), t.css({
				display: "block"
			}), a.css({
				display: "none"
			}))
		}
	}
});
_.Module.define({
	path: "frs-list/widget/util_top_cookie",
	sub: {
		_tid: null,
		_max_num: 10,
		initial: function(i) {
			this._tid = i
		},
		tidin: function(i) {
			var i = i || "";
			return("-" + i + "-").indexOf("-" + this._tid + "-") > -1
		},
		deltid: function(i) {
			var i = i || "";
			return i.replace(new RegExp("\\b(" + this._tid + ")+\\b\\-?|\\-?\\b(" + this._tid + ")+\\b", "g"), "")
		},
		addtid: function(i) {
			var i = i || "";
			if(this.tidin(i)) return i;
			if("" != i) var t = i.split("-");
			else var t = [];
			return t.push(this._tid), t.length > this._max_num && t.shift(), t.join("-")
		}
	}
});
var T, baidu = T = baidu || {
	version: "1.5.0"
};
baidu.guid = "$BAIDU$", window[baidu.guid] = window[baidu.guid] || {}, baidu.fn = baidu.fn || {}, baidu.fn.blank = function() {}, baidu.string = baidu.string || {}, baidu.string.format = function(t, e) {
		t = String(t);
		var i = Array.prototype.slice.call(arguments, 1),
			n = Object.prototype.toString;
		return i.length ? (i = 1 == i.length ? null !== e && /\[object Array\]|\[object Object\]/.test(n.call(e)) ? e : i : i, t.replace(/#\{(.+?)\}/g, function(t, e) {
			var s = i[e];
			return "[object Function]" == n.call(s) && (s = s(e)), "undefined" == typeof s ? "" : s
		})) : t
	}, baidu.format = baidu.string.format, baidu.object = baidu.object || {}, baidu.object.each = function(t, e) {
		var i, n, s;
		if("function" == typeof e)
			for(n in t)
				if(t.hasOwnProperty(n) && (s = t[n], i = e.call(t, s, n), i === !1)) break;
		return t
	}, baidu.extend = baidu.object.extend = function(t, e) {
		for(var i in e) e.hasOwnProperty(i) && (t[i] = e[i]);
		return t
	}, baidu.number = baidu.number || {}, baidu.number.pad = function(t, e) {
		var i = "",
			n = 0 > t,
			s = String(Math.abs(t));
		return s.length < e && (i = new Array(e - s.length + 1).join("0")), (n ? "-" : "") + i + s
	}, baidu.platform = baidu.platform || {}, baidu.platform.isAndroid = /android/i.test(navigator.userAgent), baidu.platform.isIpad = /ipad/i.test(navigator.userAgent), baidu.platform.isIphone = /iphone/i.test(navigator.userAgent), baidu.swf = baidu.swf || {}, baidu.browser = baidu.browser || {}, baidu.browser.ie = baidu.ie = /msie (\d+\.\d+)/i.test(navigator.userAgent) ? document.documentMode || +RegExp.$1 : void 0, baidu.array = baidu.array || {}, baidu.array.remove = function(t, e) {
		for(var i = t.length; i--;) i in t && t[i] === e && t.splice(i, 1);
		return t
	}, baidu.lang = baidu.lang || {}, baidu.lang.isArray = function(t) {
		return "[object Array]" == Object.prototype.toString.call(t)
	}, baidu.lang.isFunction = function(t) {
		return "[object Function]" == Object.prototype.toString.call(t)
	}, baidu.lang.toArray = function(t) {
		if(null === t || void 0 === t) return [];
		if(baidu.lang.isArray(t)) return t;
		if("number" != typeof t.length || "string" == typeof t || baidu.lang.isFunction(t)) return [t];
		if(t.item) {
			for(var e = t.length, i = new Array(e); e--;) i[e] = t[e];
			return i
		}
		return [].slice.call(t)
	}, baidu.swf.getMovie = function(t) {
		var e, i = document[t];
		return 9 == baidu.browser.ie ? i && i.length ? 1 == (e = baidu.array.remove(baidu.lang.toArray(i), function(t) {
			return "embed" != t.tagName.toLowerCase()
		})).length ? e[0] : e : i : i || window[t]
	}, baidu.swf.version = function() {
		var t = navigator;
		if(t.plugins && t.mimeTypes.length) {
			var e = t.plugins["Shockwave Flash"];
			if(e && e.description) return e.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s)+r/, ".") + ".0"
		} else if(window.ActiveXObject && !window.opera)
			for(var i = 12; i >= 2; i--) try {
				var n = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);
				if(n) {
					var s = n.GetVariable("$version");
					return s.replace(/WIN/g, "").replace(/,/g, ".")
				}
			} catch(a) {}
	}(), baidu.string.encodeHTML = function(t) {
		return String(t).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;")
	}, baidu.encodeHTML = baidu.string.encodeHTML, baidu.swf.createHTML = function(t) {
		t = t || {};
		var e, i, n, s, a, r, o = baidu.swf.version,
			u = t.ver || "6.0.0",
			l = {},
			h = baidu.string.encodeHTML;
		for(s in t) l[s] = t[s];
		if(t = l, !o) return "";
		for(o = o.split("."), u = u.split("."), n = 0; 3 > n && (e = parseInt(o[n], 10), i = parseInt(u[n], 10), !(e > i)); n++)
			if(i > e) return "";
		var d = t.vars,
			c = ["classid", "codebase", "id", "width", "height", "align"];
		if(t.align = t.align || "middle", t.classid = "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000", t.codebase = "http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0", t.movie = t.url || "", delete t.vars, delete t.url, "string" == typeof d) t.flashvars = d;
		else {
			var g = [];
			for(s in d) r = d[s], g.push(s + "=" + encodeURIComponent(r));
			t.flashvars = g.join("&")
		}
		var p = ["<object "];
		for(n = 0, a = c.length; a > n; n++) r = c[n], p.push(" ", r, '="', h(t[r]), '"');
		p.push(">");
		var f = {
			wmode: 1,
			scale: 1,
			quality: 1,
			play: 1,
			loop: 1,
			menu: 1,
			salign: 1,
			bgcolor: 1,
			base: 1,
			allowscriptaccess: 1,
			allownetworking: 1,
			allowfullscreen: 1,
			seamlesstabbing: 1,
			devicefont: 1,
			swliveconnect: 1,
			flashvars: 1,
			movie: 1
		};
		for(s in t) r = t[s], s = s.toLowerCase(), f[s] && (r || r === !1 || 0 === r) && p.push('<param name="' + s + '" value="' + h(r) + '" />');
		t.src = t.movie, t.name = t.id, delete t.id, delete t.movie, delete t.classid, delete t.codebase, t.type = "application/x-shockwave-flash", t.pluginspage = "http://www.macromedia.com/go/getflashplayer", p.push("<embed");
		var m;
		for(s in t)
			if(r = t[s], r || r === !1 || 0 === r) {
				if(new RegExp("^salign$", "i").test(s)) {
					m = r;
					continue
				}
				p.push(" ", s, '="', h(r), '"')
			}
		return m && p.push(' salign="', h(m), '"'), p.push("></embed></object>"), p.join("")
	}, baidu.swf.create = function(t, e) {
		t = t || {};
		var i = baidu.swf.createHTML(t) || t.errorMessage || "";
		e && "string" == typeof e && (e = document.getElementById(e)), e ? e.innerHTML = i : document.write(i)
	},
	function() {
		var t = window[baidu.guid];
		baidu.lang.guid = function() {
			return "TANGRAM__" + (t._counter++).toString(36)
		}, t._counter = t._counter || 1
	}(), window[baidu.guid]._instances = window[baidu.guid]._instances || {}, baidu.lang.Class = function(t) {
		this.guid = t || baidu.lang.guid(), window[baidu.guid]._instances[this.guid] = this
	}, window[baidu.guid]._instances = window[baidu.guid]._instances || {}, baidu.lang.Class.prototype.dispose = function() {
		delete window[baidu.guid]._instances[this.guid];
		for(var t in this) baidu.lang.isFunction(this[t]) || delete this[t];
		this.disposed = !0
	}, baidu.lang.Class.prototype.toString = function() {
		return "[object " + (this._className || "Object") + "]"
	}, baidu.lang.isString = function(t) {
		return "[object String]" == Object.prototype.toString.call(t)
	}, baidu.isString = baidu.lang.isString, baidu.lang.Event = function(t, e) {
		this.type = t, this.returnValue = !0, this.target = e || null, this.currentTarget = null
	}, baidu.lang.Class.prototype.addEventListener = function(t, e, i) {
		if(baidu.lang.isFunction(e)) {
			!this.__listeners && (this.__listeners = {});
			var n, s = this.__listeners;
			if("string" == typeof i && i) {
				if(/[^\w\-]/.test(i)) throw "nonstandard key:" + i;
				e.hashCode = i, n = i
			}
			0 != t.indexOf("on") && (t = "on" + t), "object" != typeof s[t] && (s[t] = {}), n = n || baidu.lang.guid(), e.hashCode = n, s[t][n] = e
		}
	}, baidu.lang.Class.prototype.removeEventListener = function(t, e) {
		if("undefined" == typeof e || (!baidu.lang.isFunction(e) || (e = e.hashCode)) && baidu.lang.isString(e)) {
			!this.__listeners && (this.__listeners = {}), 0 != t.indexOf("on") && (t = "on" + t);
			var i = this.__listeners;
			if(i[t])
				if("undefined" != typeof e) i[t][e] && delete i[t][e];
				else
					for(var n in i[t]) delete i[t][n]
		}
	}, baidu.lang.Class.prototype.dispatchEvent = function(t, e) {
		baidu.lang.isString(t) && (t = new baidu.lang.Event(t)), !this.__listeners && (this.__listeners = {}), e = e || {};
		for(var i in e) t[i] = e[i];
		var i, n = this.__listeners,
			s = t.type;
		if(t.target = t.target || this, t.currentTarget = this, 0 != s.indexOf("on") && (s = "on" + s), baidu.lang.isFunction(this[s]) && this[s].apply(this, arguments), "object" == typeof n[s])
			for(i in n[s]) n[s][i].apply(this, arguments);
		return t.returnValue
	}, baidu.lang.createClass = function(t, e) {
		e = e || {};
		var i = e.superClass || baidu.lang.Class,
			n = function() {
				i != baidu.lang.Class ? i.apply(this, arguments) : i.call(this), t.apply(this, arguments)
			};
		n.options = e.options || {};
		var s = function() {},
			a = t.prototype;
		s.prototype = i.prototype;
		var r = n.prototype = new s;
		for(var o in a) r[o] = a[o];
		return "string" == typeof e.className && (r._className = e.className), r.constructor = a.constructor, n.extend = function(t) {
			for(var e in t) n.prototype[e] = t[e];
			return n
		}, n
	}, baidu.lang.inherits = function(t, e, i) {
		var n, s, a = t.prototype,
			r = new Function;
		r.prototype = e.prototype, s = t.prototype = new r;
		for(n in a) s[n] = a[n];
		t.prototype.constructor = t, t.superClass = e.prototype, "string" == typeof i && (s._className = i)
	}, baidu.inherits = baidu.lang.inherits, baidu.lang.isBoolean = function(t) {
		return "boolean" == typeof t
	}, baidu.lang.isElement = function(t) {
		return !(!t || !t.nodeName || 1 != t.nodeType)
	}, baidu.lang.isNumber = function(t) {
		return "[object Number]" == Object.prototype.toString.call(t) && isFinite(t)
	}, baidu.lang.isObject = function(t) {
		return "function" == typeof t || !(!t || "object" != typeof t)
	}, baidu.isObject = baidu.lang.isObject, baidu.fn.bind = function(t, e) {
		var i = arguments.length > 2 ? [].slice.call(arguments, 2) : null;
		return function() {
			var n = baidu.lang.isString(t) ? e[t] : t,
				s = i ? i.concat([].slice.call(arguments, 0)) : arguments;
			return n.apply(e || n, s)
		}
	}, baidu.each = baidu.array.forEach = baidu.array.each = function(t, e, i) {
		var n, s, a, r = t.length;
		if("function" == typeof e)
			for(a = 0; r > a && (s = t[a], n = e.call(i || t, s, a), n !== !1); a++);
		return t
	}, baidu.array.some = function(t, e, i) {
		for(var n = 0, s = t.length; s > n; n++)
			if(n in t && e.call(i || t, t[n], n)) return !0;
		return !1
	}, baidu.browser.chrome = /chrome\/(\d+\.\d+)/i.test(navigator.userAgent) ? +RegExp.$1 : void 0, baidu.browser.firefox = /firefox\/(\d+\.\d+)/i.test(navigator.userAgent) ? +RegExp.$1 : void 0, baidu.browser.isWebkit = /webkit/i.test(navigator.userAgent);
try {
	/(\d+\.\d+)/.test(external.max_version) && (baidu.browser.maxthon = +RegExp.$1)
} catch(e) {}! function() {
	var t = navigator.userAgent;
	baidu.browser.safari = /(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(t) && !/chrome/i.test(t) ? +(RegExp.$1 || RegExp.$2) : void 0
}(), baidu.dom = baidu.dom || {}, baidu.dom.g = function(t) {
	return "string" == typeof t || t instanceof String ? document.getElementById(t) : t && t.nodeName && (1 == t.nodeType || 9 == t.nodeType) ? t : null
}, baidu.g = baidu.G = baidu.dom.g, baidu.dom._styleFixer = baidu.dom._styleFixer || {}, baidu.dom._styleFilter = baidu.dom._styleFilter || [], baidu.dom._styleFilter.filter = function(t, e, i) {
	for(var n, s = 0, a = baidu.dom._styleFilter; n = a[s]; s++)(n = n[i]) && (e = n(t, e));
	return e
}, baidu.string.toCamelCase = function(t) {
	return t.indexOf("-") < 0 && t.indexOf("_") < 0 ? t : t.replace(/[-_][^-_]/g, function(t) {
		return t.charAt(1).toUpperCase()
	})
}, baidu.dom.setStyle = function(t, e, i) {
	var n, s = baidu.dom;
	return t = s.g(t), e = baidu.string.toCamelCase(e), (n = s._styleFilter) && (i = n.filter(e, i, "set")), n = s._styleFixer[e], n && n.set ? n.set(t, i) : t.style[n || e] = i, t
}, baidu.setStyle = baidu.dom.setStyle, baidu.dom.setStyles = function(t, e) {
	t = baidu.dom.g(t);
	for(var i in e) baidu.dom.setStyle(t, i, e[i]);
	return t
}, baidu.setStyles = baidu.dom.setStyles, baidu.dom._NAME_ATTRS = function() {
	var t = {
		cellpadding: "cellPadding",
		cellspacing: "cellSpacing",
		colspan: "colSpan",
		rowspan: "rowSpan",
		valign: "vAlign",
		usemap: "useMap",
		frameborder: "frameBorder"
	};
	return baidu.browser.ie < 8 ? (t["for"] = "htmlFor", t["class"] = "className") : (t.htmlFor = "for", t.className = "class"), t
}(), baidu.dom.setAttr = function(t, e, i) {
	return t = baidu.dom.g(t), "style" == e ? t.style.cssText = i : (e = baidu.dom._NAME_ATTRS[e] || e, t.setAttribute(e, i)), t
}, baidu.setAttr = baidu.dom.setAttr, baidu.dom.setAttrs = function(t, e) {
	t = baidu.dom.g(t);
	for(var i in e) baidu.dom.setAttr(t, i, e[i]);
	return t
}, baidu.setAttrs = baidu.dom.setAttrs, baidu.dom.create = function(t, e) {
	var i = document.createElement(t),
		n = e || {};
	return baidu.dom.setAttrs(i, n)
}, baidu.cookie = baidu.cookie || {}, baidu.cookie._isValidKey = function(t) {
	return new RegExp('^[^\\x00-\\x20\\x7f\\(\\)<>@,;:\\\\\\"\\[\\]\\?=\\{\\}\\/\\u0080-\\uffff]+$').test(t)
}, baidu.cookie.getRaw = function(t) {
	if(baidu.cookie._isValidKey(t)) {
		var e = new RegExp("(^| )" + t + "=([^;]*)(;|$)"),
			i = e.exec(document.cookie);
		if(i) return i[2] || null
	}
	return null
}, baidu.cookie.get = function(t) {
	var e = baidu.cookie.getRaw(t);
	return "string" == typeof e ? e = decodeURIComponent(e) : null
}, baidu.cookie.setRaw = function(t, e, i) {
	if(baidu.cookie._isValidKey(t)) {
		i = i || {};
		var n = i.expires;
		"number" == typeof i.expires && (n = new Date, n.setTime(n.getTime() + i.expires)), document.cookie = t + "=" + e + (i.path ? "; path=" + i.path : "") + (n ? "; expires=" + n.toGMTString() : "") + (i.domain ? "; domain=" + i.domain : "") + (i.secure ? "; secure" : "")
	}
}, baidu.cookie.remove = function(t, e) {
	e = e || {}, e.expires = new Date(0), baidu.cookie.setRaw(t, "", e)
}, baidu.cookie.set = function(t, e, i) {
	baidu.cookie.setRaw(t, encodeURIComponent(e), i)
}, baidu.sio = baidu.sio || {}, baidu.sio._createScriptTag = function(t, e, i) {
	t.setAttribute("type", "text/javascript"), i && t.setAttribute("charset", i), t.setAttribute("src", e), document.getElementsByTagName("head")[0].appendChild(t)
}, baidu.sio._removeScriptTag = function(t) {
	if(t.clearAttributes) t.clearAttributes();
	else
		for(var e in t) t.hasOwnProperty(e) && delete t[e];
	t && t.parentNode && t.parentNode.removeChild(t), t = null
}, baidu.sio.callByServer = function(t, e, i) {
	function n(t) {
		return function() {
			try {
				t ? l.onfailure && l.onfailure() : (e.apply(window, arguments), clearTimeout(a)), window[s] = null, delete window[s]
			} catch(i) {} finally {
				baidu.sio._removeScriptTag(o)
			}
		}
	}
	var s, a, r, o = document.createElement("SCRIPT"),
		u = "bd__cbs__",
		l = i || {},
		h = l.charset,
		d = l.queryField || "callback",
		c = l.timeOut || 0,
		g = new RegExp("(\\?|&)" + d + "=([^&]*)");
	baidu.lang.isFunction(e) ? (s = u + Math.floor(2147483648 * Math.random()).toString(36), window[s] = n(0)) : baidu.lang.isString(e) ? s = e : (r = g.exec(t)) && (s = r[2]), c && (a = setTimeout(n(1), c)), t = t.replace(g, "$1" + d + "=" + s), t.search(g) < 0 && (t += (t.indexOf("?") < 0 ? "?" : "&") + d + "=" + s), baidu.sio._createScriptTag(o, t, h)
};
var mbox = mbox || {};
T.extend(mbox, {
	namespace: function() {
		var t, e, i, n = arguments,
			s = null;
		for(t = 0, len = n.length; len > t; t++)
			for(i = ("" + n[t]).split("."), s = mbox, e = "mbox" == i[0] ? 1 : 0; e < i.length; e += 1) s[i[e]] = s[i[e]] || {}, s = s[i[e]];
		return s
	},
	Fuze: function() {
		var t, e, i;
		return t = [], e = function(e) {
			i ? e() : t.push(e)
		}, e.fire = function() {
			for(; t.length;) t.shift()();
			i = !0
		}, e.extinguish = function() {
			i = !1
		}, e.wettish = function() {
			this.fire(), this.extinguish()
		}, e.clear = function() {
			for(; t.length;) t.shift();
			this.extinguish()
		}, e
	},
	convertTime: function(t) {
		var e, i;
		return t = Math.round(t / 1e3), e = Math.floor(t / 60), i = t % 60, T.number.pad(e, 2) + ":" + T.number.pad(i, 2)
	},
	Timer: function(t) {
		var e = function(t, e) {
			this._timer = function() {}, this._listener = function() {}, this._timerComplete = function() {}, this._timerID = null, this._delay = this._remain = t, this._repeatCount = e || 0, this._currentCount = 0, this._isRunning = !1, this._startTime = this._endTime = 0, this.EVENTS = {
				TIMER: "timer",
				COMPLETE: "timerComplete"
			}
		};
		return e.prototype = {
			_createTimer: function(e, i) {
				var n = this;
				return 1 == i ? function() {
					return t.setTimeout(function() {
						n.reset(), n._listener(n._delay, i), n._timerComplete()
					}, e)
				} : function() {
					return t.setInterval(function() {
						0 != i && n._currentCount >= i ? (n.reset(), n._timerComplete()) : (n._currentCount++, n._listener(e, n._currentCount))
					}, e)
				}
			},
			addEventListener: function(t, e) {
				"timer" == t ? (this._listener = e, this._timer = this._createTimer(this._delay, this._repeatCount)) : "timerComplete" == t && (this._timerComplete = e)
			},
			reset: function() {
				this.stop(), 1 == this._repeatCount && (this._timer = this._createTimer(this._delay, this._repeatCount)), this._currentCount = 0, this._remain = this._delay, this._startTime = this._endTime = 0
			},
			start: function() {
				this._timerID || (this._timerID = this._timer(), 1 == this._repeatCount && (this._startTime = (new Date).getTime()), this._isRunning = !0)
			},
			stop: function() {
				this._timerID && (1 == this._repeatCount ? t.clearTimeout(this._timerID) : t.clearInterval(this._timerID), this._timerID = null, this._isRunning = !1)
			},
			pause: function() {
				1 == this._repeatCount ? this._timerID && (this.stop(), this._endTime = (new Date).getTime(), this._remain = this._remain - (this._endTime - this._startTime), this._remain > 0 ? this._timer = this._createTimer(this._remain, 1) : this.reset()) : this.stop()
			},
			getCurrentCount: function() {
				return this._currentCount
			},
			isRunning: function() {
				return this._isRunning
			}
		}, e
	}(window),
	StopWatch: function() {
		var t = 0,
			e = function() {
				this.startTime = 0, this.isRunning = !1, this.isReset = !0, this.passedTime = 0, t++
			};
		return e.prototype = {
			reset: function() {
				this.startTime = 0, this.pauseTime = 0, this.passedTime = 0, this.isRunning = !1, this.isReset = !0
			},
			start: function() {
				this.isReset ? (this.reset(), this.startTime = (new Date).getTime()) : this.isRunning || (this.startTime = (new Date).getTime()), this.isRunning = !0, this.isReset = !1
			},
			pause: function() {
				!this.isReset && this.isRunning && (this.pauseTime = (new Date).getTime(), this.passedTime += this.pauseTime - this.startTime, this.isRunning = !1)
			},
			isRunning: function() {
				return this.isRunning
			},
			isReset: function() {
				return this.isReset
			},
			getTime: function() {
				return this.isReset ? 0 : this.isRunning ? (new Date).getTime() - this.startTime + this.passedTime : this.passedTime
			},
			getCounts: function() {
				return t
			}
		}, e
	}(window)
}), mbox.namespace("mbox.lang"), T.extend(mbox.lang, {
	createClass: function(t, e) {
		var i = T.lang.createClass(t, e);
		return i.prototype.removeEventListener = function(t, e) {
			if("undefined" == typeof e || (!baidu.lang.isFunction(e) || (e = e.hashCode)) && baidu.lang.isString(e)) {
				!this.__listeners && (this.__listeners = {});
				var i = t.split(".");
				t.length > 1 && (t = i[0], e = i[1]), 0 != t.indexOf("on") && (t = "on" + t);
				var n = this.__listeners;
				if(n[t])
					if("undefined" != typeof e) n[t][e] && delete n[t][e];
					else
						for(var s in n[t]) delete n[t][s]
			}
		}, i.extend = function(t) {
			for(var e in t) i.prototype[e] = function(t, e) {
				return T.lang.isFunction(t) ? function() {
					this.dispatchEvent(e, {
						name: e,
						arguments: arguments
					});
					var i = t.apply(this, arguments);
					return i
				} : t
			}(t[e], e);
			return i
		}, i
	}
});
var mbox = mbox || {};
! function() {
	var t = "mbox";
	mbox.CONF = {
		instanceCallName: t,
		autoPlay: !1,
		autoNext: !1,
		engineArg: {
			audio: {
				constructorName: "PlayEngine_Audio"
			},
			fmp: {
				constructorName: "PlayEngine_FMP_MP3",
				args: {
					swfPath: "https://gss2.baidu.com/5LgHhXSm2Q5IlBGlnYG/player/static/flash/fmp.swf",
					instanceName: t + ".player"
				}
			}
		},
		logOpt: {
			ref: "pc_widget_tieba"
		},
		songLinkHost: {
			link: "https://gss2.baidu.com/6Ls1aze90MgYm2Gp8IqW0jdnxx1xbK/v1/restserver/ting?method=baidu.ting.song.play&format=jsonp&bit=128&songid=",
			lrc: "https://gss2.baidu.com/6Ls1aze90MgYm2Gp8IqW0jdnxx1xbK/v1/restserver/ting?method=baidu.ting.song.lry&fromat=jsonp&songid=",
			sug: "https://gss2.baidu.com/6Ls1aze90MgYm2Gp8IqW0jdnxx1xbK/v1/restserver/ting?method=baidu.ting.search.common&page_size=1&page_no=1&query="
		}
	}
}(void 0);
var PlayEngine_Interface = mbox.lang.createClass(function() {
		var t = 0,
			e = {
				mute: !1,
				volume: 50
			},
			i = function(t) {
				this.STATES = {
					INIT: "init",
					READY: "ready",
					STOP: "stop",
					PLAY: "play",
					PAUSE: "pause",
					END: "end",
					BUFFERING: "buffering",
					PREBUFFER: "pre-buffer",
					ERROR: "error"
				}, this.EVENTS = {
					STATECHANGE: "player_playStateChange",
					POSITIONCHANGE: "player_positionChange",
					PROGRESS: "player_progress",
					ERROR: "player_error",
					INIT: "player_initSuccess",
					INITFAIL: "player_initFail"
				}, t = t || {}, this.mute = "undefined" == typeof t.mute ? e.mute : !!t.mute, this.volume = "undefined" == typeof t.volume ? e.volume : t.volume, this.ready = !1, this.url = "", this.state = this.STATES.INIT, this.engineType = "", this.stateStack = [this.STATES.INIT], this.supportMimeType = []
			};
		return i.prototype = {
			newId: function() {
				return "_m3_" + t++
			},
			init: function() {},
			reset: function() {},
			setUrl: function() {},
			getUrl: function() {
				return this.url
			},
			play: function() {},
			pause: function() {},
			stop: function() {},
			setMute: function() {},
			getMute: function() {
				return this.mute
			},
			setVolume: function() {},
			getVolume: function() {
				return this.volume
			},
			getState: function() {
				return ""
			},
			setCurrentPosition: function() {},
			getCurrentPosition: function() {
				return 0
			},
			getLoadedPercent: function() {
				return 0
			},
			getLoadedBytes: function() {
				return 0
			},
			getTotalBytes: function() {
				return 0
			},
			getTotalTime: function() {
				return 0
			},
			getVersion: function() {
				return ""
			},
			getEngineType: function() {
				return this.engineType
			},
			canPlayType: function(t) {
				var e = this.getSupportMimeTypeList();
				return T.array.some(e, function(e) {
					return t == e
				})
			},
			getSupportMimeTypeList: function() {
				return this.supportMimeType
			},
			setEventListener: function(t, e, i) {
				var n = T.fn.bind(function() {
					return e.apply(this, arguments)
				}, this);
				this.addEventListener(t, n, i)
			}
		}, i
	}(window), {
		superClass: T.lang.Class,
		className: "PlayEngine_Interface"
	}),
	PlayEngine_Audio = mbox.lang.createClass(function(t) {
		t = t || {}, this.engineType = "audio", this.contentType = {
			mp3: ["audio/mpeg", "audio/mp3"],
			mp4: ["audio/mp4", "audio/MP4A-LATM", "video/mpeg4", "audio/mpeg4-generic"],
			m4a: ["audio/mp4", "audio/MP4A-LATM", "video/mpeg4", "audio/mpeg4-generic"],
			aac: ["audio/aac", "audio/aacp"],
			"3gp": ["audio/3gpp", "audio/3gpp2"],
			ogg: ["audio/ogg", "video/ogg", "application/ogg", "audio/vorbis"],
			oga: ["audio/ogg", "application/ogg", "audio/vorbis"],
			wma: ["audio/x-ms-wma"]
		}, this.supportAudio = "undefined" != typeof Audio, this.supportMimeType = [], this.supportAudio && (this.audio = new Audio, "function" == typeof this.audio.canPlayType && T.object.each(this.contentType, T.fn.bind(function(t, e) {
			for(var i = 0; i < t.length; i++) {
				var n = this.audio.canPlayType(t[i]);
				if("probably" == n || "maybe" == n) {
					this.supportMimeType.push(e);
					break
				}
			}
		}, this)), this.supportMimeType.length || (this.supportAudio = !1)), this.supportVolume = T.fn.bind(function() {
			return this.supportAudio ? (this.audio.volume = .5, this.audio.volume < 1) : !1
		}, this)()
	}, {
		superClass: PlayEngine_Interface,
		className: "PlayEngine_Audio"
	}).extend({
		test: function(t) {
			return t = !!t, !this.supportAudio && t && this.dispatchEvent(this.EVENTS.INITFAIL, {
				engineType: this.engineType
			}), this.supportAudio
		},
		init: function() {
			this.lastState = this.STATES.INIT, this.muted = this.audio.muted = !1, this.volume = 50, this.audio.volume = .5, this.url = "", this._definedEvents(), this.state = this.STATES.READY, this.dispatchEvent(this.EVENTS.INIT, {
				engineType: this.engineType,
				engine: this.audio
			})
		},
		reset: function() {
			this.supportAudio && (this.url = "", this.audio.pause(), this.state = "ready", this.lastState = "ready")
		},
		setUrl: function(t) {
			this.supportAudio && (this.url = t, this.audio.src = t, this.audio.load(), this._firePlayStateChange(this.STATES.PREBUFFER))
		},
		play: function() {
			if(this.supportAudio && "ready" != this.state)
				if(T.platform.isAndroid && T.browser.isWebkit && this.audio.readyState < 3) {
					var t = T.fn.bind(function() {
						this.audio.play(), this.audio.removeEventListener("canplay", t, !1)
					}, this);
					this.audio.addEventListener("canplay", t, !1)
				} else this.audio.play()
		},
		pause: function() {
			this.supportAudio && this.state != this.STATES.STOP && this.state != this.STATES.READY && this.state != this.STATES.END && (this.audio.pause(), this._firePlayStateChange(this.STATES.PAUSE))
		},
		stop: function() {
			this.supportAudio && this.state != this.STATES.READY && (0 != this.audio.currentTime && (this.audio.currentTime = 0), this.audio.pause(), this._firePlayStateChange(this.STATES.STOP))
		},
		setMute: function(t) {
			this.supportAudio && (this.audio.muted = this.mute = t)
		},
		setVolume: function(t) {
			this.supportAudio && (t = T.lang.isNumber(t) ? t : 50, t = Math.max(Math.min(t, 100), 0), this.volume = t, this.audio.volume = t / 100)
		},
		setCurrentPosition: function(t) {
			if(this.supportAudio)
				if(T.platform.isAndroid && this.audio.readyState < 3) {
					var e = T.fn.bind(function() {
						this.audio.currentTime = t / 1e3, this.audio.play(), this.audio.removeEventListener("canplay", e, !1)
					}, this);
					this.audio.addEventListener("canplay", e, !1)
				} else this.audio.currentTime = t / 1e3, this.audio.play()
		},
		getCurrentPosition: function() {
			return this.supportAudio ? Math.round(1e3 * this.audio.currentTime) : 0
		},
		getLoadedPercent: function() {
			try {
				var t = this.audio.buffered.end(0),
					e = this.audio.duration;
				return e = isNaN(e) ? 0 : e, Math.round(t / e * 100) / 100
			} catch(i) {
				return 0
			}
		},
		getTotalTime: function() {
			if(!this.supportAudio) return 0;
			var t = this.audio.duration;
			return t = isNaN(t) ? 0 : t, Math.round(1e3 * t)
		},
		getState: function() {
			return this.state
		},
		_firePlayStateChange: function(t) {
			this.state != t && (this.lastState = this.state, this.state = t, this.dispatchEvent(this.EVENTS.STATECHANGE, {
				newState: t,
				oldState: this.lastState,
				engineType: this.engineType
			}))
		},
		_definedEvents: function() {
			this.audio.addEventListener("error", T.fn.bind(function() {
				this._firePlayStateChange(this.STATES.ERROR), this.dispatchEvent(this.EVENTS.ERROR, {
					engineType: this.engineType
				})
			}, this), !1), this.audio.addEventListener("ended", T.fn.bind(function() {
				this._firePlayStateChange(this.STATES.END)
			}, this), !1), this.audio.addEventListener("playing", T.fn.bind(function() {
				this._firePlayStateChange(this.STATES.PLAY)
			}, this), !1), this.audio.addEventListener("pause", T.fn.bind(function() {
				this.getState() == this.STATES.PLAY && this._firePlayStateChange(this.getCurrentPosition() ? this.STATES.PAUSE : this.STATES.STOP)
			}, this), !1), this.audio.addEventListener("waiting", T.fn.bind(function() {
				this._firePlayStateChange(this.getCurrentPosition() ? this.STATES.BUFFERING : this.STATES.PREBUFFER)
			}, this), !1)
		}
	}),
	PlayEngine_FMP_MP3 = mbox.lang.createClass(function(t) {
		t = t || {}, this.supportMimeType = ["mp3"], this.engineType = "fmp_mp3", this.swfPath = "fmp_mp3.swf", this.flashVersionRequire = t.flashVersionRequire || "9.0.0", this.versionErrorMessage = t.versionErrorMessage || "", this.stateCode = {
			"-2": this.STATES.INIT,
			"-1": this.STATES.READY,
			0: this.STATES.STOP,
			1: this.STATES.PLAY,
			2: this.STATES.PAUSE,
			3: this.STATES.END,
			4: this.STATES.BUFFERING,
			5: this.STATES.PREBUFFER,
			6: this.STATES.ERROR
		}, this.flashLoaded = !1, this.flashReady = new mbox.Fuze
	}, {
		superClass: PlayEngine_Interface,
		className: "PlayEngine_FMP_MP3"
	}).extend({
		test: function(t) {
			return this._checkPlayer(t)
		},
		init: function(t) {
			t = t || {};
			var e = t.el;
			this.instanceName = t.instanceName, this.swfPath = t.swfPath || this.swfPath;
			var i, n = this.newId();
			T.lang.isString(e) && (e = T.g(e)), e || (e = T.dom.create("div"), document.body.appendChild(e)), i = T.dom.create("div"), e.appendChild(i), this.swfPath += "?" + n + "_" + Math.random(), T.swf.create({
				id: this.flashObjectId = n,
				width: "1px",
				height: "1px",
				ver: this.flashVersionRequire,
				errorMessage: this.versionErrorMessage,
				allowscriptaccess: "always",
				url: this.swfPath,
				bgcolor: "#ffffff",
				wmode: "window",
				scale: "noscale",
				vars: {
					_instanceName: this.instanceName + "",
					_buffertime: 2e3
				}
			}, i), this.flashObject = T.swf.getMovie(this.flashObjectId)
		},
		reset: function() {
			this.stop(), this.state != this.STATES.INIT && (this.url = "", this.state = this.STATES.READY, this.stateStack = [this.STATES.READY])
		},
		setUrl: function(t) {
			this.flashReady(T.fn.bind(function() {
				this.url = t, this.flashObject.closeStream(), this.flashObject.f_load(t)
			}, this))
		},
		play: function() {
			this.flashReady(T.fn.bind(function() {
				this.state != this.STATES.PLAY && this.flashObject.f_play()
			}, this))
		},
		pause: function() {
			this.flashReady(T.fn.bind(function() {
				this.state != this.STATES.PAUSE && this.state != this.STATES.STOP && this.state != this.STATES.END && this.flashObject.f_pause()
			}, this))
		},
		stop: function() {
			this.flashReady(T.fn.bind(function() {
				this.state != this.STATES.STOP && this.flashObject.f_stop()
			}, this))
		},
		setMute: function(t) {
			this.flashReady(T.fn.bind(function() {
				this.mute = t, this.flashObject.setData("mute", t)
			}, this))
		},
		setVolume: function(t) {
			this.flashReady(T.fn.bind(function() {
				this.volume = t, this.flashObject.setData("volume", t)
			}, this))
		},
		setCurrentPosition: function(t) {
			this.flashReady(T.fn.bind(function() {
				this.flashObject.f_play(t)
			}, this))
		},
		getCurrentPosition: function() {
			return this.flashLoaded ? this.flashObject.getData("currentPosition") : 0
		},
		getLoadedPercent: function() {
			return this.flashLoaded ? this.flashObject.getData("loadedPct") : 0
		},
		getTotalTime: function() {
			return this.flashLoaded ? this.flashObject.getData("length") : 0
		},
		getState: function(t) {
			return T.lang.isNumber(t) ? this.stateCode[t] : this.state
		},
		getVersion: function() {
			return T.swf.version
		},
		_firePlayStateChange: function(t) {
			if(this.state != t) {
				this.state = t, this.stateStack.push(t);
				var e = this.stateStack.shift();
				this.dispatchEvent(this.EVENTS.STATECHANGE, {
					newState: t,
					oldState: e,
					engineType: this.engineType
				})
			}
		},
		_onLoad: function() {
			this.state = this.STATES.READY, this.stateStack = [this.state], this.dispatchEvent(this.EVENTS.INIT, {
				engineType: this.engineType,
				engine: this.flashObject
			}), setTimeout(T.fn.bind(function() {
				this.flashReady.fire(), this.flashLoaded = !0
			}, this), 0)
		},
		_onPlayStateChange: function(t) {
			setTimeout(T.fn.bind(function() {
				this._firePlayStateChange(this.getState(t))
			}, this), 0)
		},
		_checkPlayer: function(t) {
			t = !!t;
			var e = T.swf.version,
				i = this.flashVersionRequire;
			if(e) {
				var n = e.split("."),
					s = i.split(".");
				return n[0] - s[0] >= 0 && n[1] - s[1] >= 0 ? !0 : (t && this.dispatchEvent(this.EVENTS.INITFAIL, {
					engineType: this.engineType
				}), !1)
			}
			return t && this.dispatchEvent(this.EVENTS.INITFAIL, {
				engineType: this.engineType
			}), !1
		}
	}),
	PlayEngine = mbox.lang.createClass(function(t) {
		t = t || {}, this.subEnginesConf = [], this.subEnginesInitArgs = {}, this.curEngine = null, this.curEngineType = "", this.unInitEngineList = [], this.engineList = [], this.engineTypeList = [], this.ready = !1, this.defaultExt = ".mp3", this.coreContainer = null, this.EVENTS = {
			STATECHANGE: "player_playStateChange",
			POSITIONCHANGE: "player_positionChange",
			PROGRESS: "player_progress",
			ERROR: "player_error",
			INIT: "player_initSuccess",
			INITFAIL: "player_initFail"
		}, this.STATES = {
			INIT: "init",
			READY: "ready",
			STOP: "stop",
			PLAY: "play",
			PAUSE: "pause",
			END: "end",
			BUFFERING: "buffering",
			PREBUFFER: "pre-buffer",
			ERROR: "error"
		}, this.progressTimer = new mbox.Timer(200, 0), this.positionTimer = new mbox.Timer(100, 0), this._initEngines(t)
	}, {
		className: "PlayEngine"
	}).extend({
		_error: function(t) {
			throw new Error(t)
		},
		_initEngines: function(config) {
			this.coreContainer = config.el || null, this.subEnginesConf = config.subEngines || [], T.array.each(this.subEnginesConf, T.fn.bind(function(item, index) {
				var subEngineName = item.constructorName,
					args = item.args || {},
					subEngineConstructor;
				this.subEnginesInitArgs[subEngineName] = args;
				try {
					if(subEngineConstructor = eval(subEngineName), !T.lang.isFunction(subEngineConstructor)) return
				} catch(e) {
					return
				}
				var engine = new subEngineConstructor(args);
				this.unInitEngineList.push(engine)
			}, this)), this.curEngine = this.unInitEngineList[0]
		},
		init: function(t) {
			if(this.ready) return this._error("");
			if(t = t || {}, this.subEnginesInitArgs = t.subEngines ? t.subEngines : this.subEnginesInitArgs, this.coreContainer = t.el ? t.el : this.coreContainer, !this.coreContainer) {
				var e = T.dom.create("div", {
					id: "_player_container_" + T.lang.guid()
				});
				T.dom.setStyles(e, {
					width: "1px",
					height: "1px",
					overflow: "hidden"
				}), document.body.appendChild(e), this.coreContainer = t.el = e
			}
			T.array.each(this.unInitEngineList, T.fn.bind(function(t) {
				var e = t.toString(),
					i = "",
					n = /^\[object (.*)\]$/i;
				n.test(e) && (i = RegExp.$1);
				var s = this.subEnginesInitArgs[i] || {};
				t.test(!0) && (s.instanceName = s.instanceName + ".engineList[" + this.engineList.length + "]", s.el = s.el || this.coreContainer, this.engineList.push(t), t.init.apply(t, [s]))
			}, this)), this.switchEngineByUrl(this.defaultExt), this.ready = !0, this._initProgressEvent(), this._initPositionChangeEvent()
		},
		canPlayType: function(t) {
			return T.array.some(this.engineList, function(e) {
				return e.canPlayType(t)
			})
		},
		getSupportMimeTypeList: function() {
			var t = [];
			return T.array.each(this.engineList, T.fn.bind(function(e) {
				t = t.concat(e.getSupportMimeTypeList())
			}, this)), t
		},
		switchEngineByUrl: function(t) {
			var e = T.array.some(this.engineList, T.fn.bind(function(e) {
					var i = e.getSupportMimeTypeList().join("|"),
						n = new RegExp("\\.(" + i + ")(\\?|$)", "ig");
					return n.test(t) ? (this.curEngine = e, this.curEngineType = e.getEngineType(), !0) : void 0
				}, this)),
				i = arguments[1];
			e || i || arguments.callee.apply(this, [this.defaultExt, !0])
		},
		switchEngineByMimeType: function(t) {
			T.array.some(this.engineList, T.fn.bind(function(e) {
				return e.canPlayType(t) ? (this.curEngine = e, this.curEngineType = e.getEngineType(), !0) : void 0
			}, this))
		},
		reset: function() {
			this.curEngine.reset.apply(this.curEngine, arguments)
		},
		setUrl: function(t) {
			var e = this.curEngine;
			this.switchEngineByUrl(t), e && e != this.curEngine && e.stop(), this.curEngine && this.curEngine.setUrl.apply(this.curEngine, arguments)
		},
		getUrl: function() {
			return this.curEngine.getUrl.apply(this.curEngine, arguments)
		},
		play: function(t) {
			return "undefined" != typeof t ? this.setCurrentPosition(t) : this.curEngine ? this.curEngine.play.apply(this.curEngine, arguments) : void 0
		},
		pause: function() {
			return this.curEngine ? this.curEngine.pause.apply(this.curEngine, arguments) : void 0
		},
		stop: function() {
			return this.curEngine ? this.curEngine.stop.apply(this.curEngine, arguments) : void 0
		},
		setMute: function() {
			var t = arguments;
			T.array.each(this.engineList, function(e) {
				e.setMute.apply(e, t)
			})
		},
		getMute: function() {
			return this.curEngine ? this.curEngine.getMute.apply(this.curEngine, arguments) : !1
		},
		setVolume: function() {
			var t = arguments;
			T.array.each(this.engineList, function(e) {
				e.setVolume.apply(e, t)
			})
		},
		getVolume: function() {
			return this.curEngine ? this.curEngine.getVolume.apply(this.curEngine, arguments) : 0
		},
		setCurrentPosition: function() {
			return this.curEngine ? this.curEngine.setCurrentPosition.apply(this.curEngine, arguments) : void 0
		},
		getCurrentPosition: function() {
			return this.curEngine ? this.curEngine.getCurrentPosition.apply(this.curEngine, arguments) : 0
		},
		getCurrentPositionString: function() {
			return mbox.convertTime(this.getCurrentPosition())
		},
		getLoadedPercent: function() {
			return this.curEngine ? this.curEngine.getLoadedPercent.apply(this.curEngine, arguments) : 0
		},
		getLoadedBytes: function() {
			return this.curEngine ? this.curEngine.getLoadedBytes.apply(this.curEngine, arguments) : void 0
		},
		getTotalBytes: function() {
			return this.curEngine ? this.curEngine.getTotalBytes.apply(this.curEngine, arguments) : 0
		},
		getTotalTime: function() {
			return this.curEngine ? this.curEngine.getTotalTime.apply(this.curEngine, arguments) : 0
		},
		getTotalTimeString: function() {
			return mbox.convertTime(this.getTotalTime())
		},
		getCurEngine: function() {
			return this.curEngine
		},
		getEngineType: function() {
			return this.getCurEngine().getEngineType()
		},
		getVersion: function() {
			var t = {};
			return T.array.each(this.engineList, function(e) {
				t[e.getEngineType()] = e.getVersion()
			}), t
		},
		getState: function() {
			return this.curEngine ? this.curEngine.getState.apply(this.curEngine, arguments) : null
		},
		setEventListener: function(t, e, i) {
			var n;
			n = t == this.EVENTS.INITFAIL || t == this.EVENTS.INIT ? T.fn.bind(function() {
				e.apply(this, arguments)
			}, this) : T.fn.bind(function(t) {
				t.target && t.target.getEngineType() == this.curEngineType && e.apply(this, arguments)
			}, this), T.array.each(this.unInitEngineList, function(e) {
				e.setEventListener(t, n, i)
			})
		},
		removeEventListener: function(t, e) {
			T.array.each(this.unInitEngineList, function(i) {
				i.removeEventListener(t, e)
			})
		},
		_initProgressEvent: function() {
			this.progressTimer.addEventListener("timer", T.fn.bind(function() {
				var t = this.getLoadedPercent();
				this.curEngine.dispatchEvent(this.EVENTS.PROGRESS, {
					progress: t,
					totalBytes: this.getTotalBytes(),
					loadedBytes: this.getLoadedBytes(),
					totalTime: this.getTotalTime()
				}), 1 == t && "wmp" != this.curEngineType && this.progressTimer.stop()
			}, this)), this.setEventListener(this.EVENTS.STATECHANGE, T.fn.bind(function(t) {
				var e = t.newState;
				switch(e) {
					case this.STATES.PREBUFFER:
					case this.STATES.PLAY:
						this.getLoadedPercent() < 1 && this.progressTimer.start();
						break;
					case this.STATES.STOP:
					case this.STATES.READY:
					case this.STATES.END:
						this.progressTimer.reset()
				}
			}, this)), this.setEventListener("setUrl", T.fn.bind(function() {
				this.progressTimer.reset(), this.progressTimer.start()
			}, this))
		},
		_initPositionChangeEvent: function() {
			this.positionTimer.addEventListener("timer", T.fn.bind(function() {
				var t = this.getCurrentPosition();
				this.curEngine.dispatchEvent(this.EVENTS.POSITIONCHANGE, {
					position: t
				})
			}, this)), this.setEventListener(this.EVENTS.STATECHANGE, T.fn.bind(function(t) {
				var e = t.newState;
				switch(e) {
					case this.STATES.PLAY:
						this.positionTimer.start();
						break;
					case this.STATES.STOP:
					case this.STATES.PAUSE:
						this.positionTimer.pause(), this.curEngine.dispatchEvent(this.EVENTS.POSITIONCHANGE, {
							position: this.getCurrentPosition()
						});
						break;
					case this.STATES.READY:
					case this.STATES.END:
						this.positionTimer.reset()
				}
			}, this)), this.setEventListener("setUrl", T.fn.bind(function() {
				this.positionTimer.reset()
			}, this))
		}
	});
mbox.SongModel = function(t) {
		t = t || {}, this.hasLink = !1, this.songId = 0, this.songName = "", this.artistId = 0, this.artistName = "", this.albumId = 0, this.albumName = "", this.songPicSmall = "", this.songPicBig = "", this.songPicRadio = "", this.lrcLink = "", this.time = 0, this.songLink = "", this.showLink = "", this.format = "", this.rate = 0, this.size = 0, this.lyricContent = "", this.relateStatus = 0, this.resourceType = 0, this.copyType = 0;
		for(var e in t) {
			var i = t[e];
			if(!T.isString(this[e]) && "" != i) {
				var n = +i;
				n == i ? i = n : null == i && (i = "")
			}
			this[e] = i
		}
	}, mbox.SongModel.prototype = {
		set: function(t) {
			for(var e in t) {
				var i = t[e];
				if(!T.isString(this[e]) && "" != i) {
					var n = +i;
					n == i ? i = n : null == i && (i = "")
				}
				this[e] = i
			}
		},
		get: function(t) {
			return this[t]
		},
		unset: function(t) {
			delete this[t]
		}
	},
	function() {
		var t = T.lang.createClass(function() {
			this.allSongCache = {}, this.apiAddress = mbox.CONF.songLinkHost.link, this.lrcAddress = mbox.CONF.songLinkHost.lrc, this.sugAddress = mbox.CONF.songLinkHost.sug
		}).extend({
			createSongModel: function(t, e) {
				var i = [],
					t = T.lang.toArray(t),
					e = T.lang.toArray(e);
				return T.each(t, function(t) {
					t && "null" !== t && "undefined" !== t && (this.allSongCache[t] || (this.allSongCache[t] = new mbox.SongModel({
						songId: t
					})), i.push(this.allSongCache[t]))
				}, this), T.object.each(e, function(t) {
					this.allSongCache[t.queryId || t.id] && this.allSongCache[t.queryId || t.id].set(t)
				}, this), i
			},
			fetchIdByQuery: function(t, e) {
				var i = t.split("$$"),
					n = i[0] || i[2],
					s = i[1];
				T.sio.callByServer(this.sugAddress + n + " " + s, function(i) {
					i.song_list && i.song_list.length ? e(i.song_list[0].song_id) : e(t)
				})
			},
			fetchSong: function(t, e) {
				var i = this;
				t.hasLink ? T.lang.isFunction(e.success) && e.success(t, this) : t.songId.toString().indexOf("$$") > -1 ? this.fetchIdByQuery(t.songId, T.fn.bind(function(n) {
					T.sio.callByServer(this.apiAddress + n, function(n) {
						if(22e3 === n.error_code) {
							var s = n.songinfo,
								a = n.bitrate;
							if(s.extra) {
								var r = s.extra.split("$$");
								s.song_id = s.extra, s.title = r[0] || r[2], s.author = r[1]
							}
							t.set({
								hasLink: !0,
								songId: s.song_id,
								songName: s.title,
								artistId: s.ting_uid,
								artistName: s.author,
								albumId: s.album_id,
								albumName: s.album_title,
								songPicBig: i.parseHttpsSongPic(s.pic_big),
								songPicSmall: i.parseHttpsSongPic(s.pic_small) || "//tb2.bdstatic.com/tb/img/no-pic_7a0425f.jpg",
								songPicRadio: s.pic_radio,
								resourceType: s.resource_type,
								relateStatus: s.relate_status,
								copyType: s.copy_type,
								lrcLink: s.lrclink,
								rate: a.file_bitrate,
								songLink: a.file_link,
								showLink: a.show_link,
								format: a.file_extension,
								size: a.file_size,
								time: a.file_duration
							}), T.lang.isFunction(e.success) && e.success(t, this)
						} else T.lang.isFunction(e.error) && e.error(t, n.error_code)
					})
				}, this)) : T.sio.callByServer(this.apiAddress + t.songId, function(n) {
					if(22e3 === n.error_code) {
						var s = n.songinfo,
							a = n.bitrate;
						if(s.extra) {
							var r = s.extra.split("$$");
							s.song_id = s.extra, s.title = r[0] || r[2], s.author = r[1]
						}
						t.set({
							hasLink: !0,
							songId: s.song_id,
							songName: s.title,
							artistId: s.ting_uid,
							artistName: s.author,
							albumId: s.album_id,
							albumName: s.album_title,
							songPicBig: i.parseHttpsSongPic(s.pic_big),
							songPicSmall: i.parseHttpsSongPic(s.pic_small) || "//tb2.bdstatic.com/tb/img/no-pic_7a0425f.jpg",
							songPicRadio: s.pic_radio,
							resourceType: s.resource_type,
							relateStatus: s.relate_status,
							copyType: s.copy_type,
							lrcLink: s.lrclink,
							rate: a.file_bitrate,
							songLink: a.file_link,
							showLink: a.show_link,
							format: a.file_extension,
							size: a.file_size,
							time: a.file_duration
						}), T.lang.isFunction(e.success) && e.success(t, this)
					} else T.lang.isFunction(e.error) && e.error(t, n.error_code)
				})
			},
			parseHttpsSongPic: function(t) {
				return t && "https:" === $.tb.location.getProtocol() ? t.replace("http://musicdata.baidu.com", "https://gss0.baidu.com/8_1ZdTmk2RIF8t7jm9iCKT-xh_") : t
			},
			getLrcContent: function(t, e) {
				var i = T.lang.isFunction,
					n = i(e) ? e : i(e.success) ? e.success : function() {},
					s = i(e.error) ? e.error : function() {};
				t.lrcContent ? n(t.lrcContent) : t.songLink && t.lrcLink ? T.sio.callByServer(this.lrcAddress + t.songId, function(e) {
					e.lrcContent ? (t.lrcContent = e.lrcContent, n(e.lrcContent)) : s()
				}) : s()
			}
		});
		mbox.SongDataModel = new t
	}(void 0),
	function() {
		var t = {
			RANDOM: 0,
			SINGLE: 1,
			CYCLE: 2
		};
		mbox.PlayList = T.lang.createClass(function() {
			this.curSongIndex = -1, this.curSong = null, this.songModels = [], this.mode = t.SINGLE
		}).extend({
			_random: function() {
				return parseInt(Math.random() * this.getLength(), 10)
			},
			addSong: function(t) {
				t = T.lang.toArray(t), t.length && (this.songModels = this.songModels.concat(t), this.dispatchEvent("add:songModels", {
					songModels: t
				}))
			},
			removeSong: function(t) {
				if(-1 === t) this.reset(), this.dispatchEvent("remove:songModels", {
					indexes: e
				});
				else {
					var e = T.lang.toArray(t),
						i = e.length;
					if(i) {
						e.sort(function(t, e) {
							return t - e
						});
						for(var n = this.curSongIndex, s = n, a = !1; i--;) {
							var r = e[i];
							this.songModels.splice(r, 1), -1 !== s && (r === n && (a = !0), n >= r && n--)
						}
						a && n++, -1 !== s && (0 > n && songlist.length > 0 ? (n = 0, a = !0) : n > songlist.length - 1 && (n = 0)), a && (this.curSong = songlist[n], this.curSongIndex = n), this.dispatchEvent("remove:songModels", {
							indexes: e
						})
					}
				}
			},
			prev: function() {
				var e = this.getLength(),
					i = -1 === this.curSongIndex ? 0 : (this.curSongIndex + e - 1) % e;
				e && (this.mode === t.RANDOM ? this.setCurIndex(this._random()) : this.setCurIndex(i))
			},
			next: function() {
				var e = this.getLength(),
					i = (this.curSongIndex + 1) % e;
				e && (this.mode === t.RANDOM ? this.setCurIndex(this._random()) : this.setCurIndex(i))
			},
			autoNext: function() {
				this.mode === t.SINGLE ? this.setCurIndex(this.curSongIndex) : this.next()
			},
			setCurIndex: function(t) {
				this.curSongIndex = t, this.setCurSong(this.songModels[t]), this.dispatchEvent("change:curSongIndex", {
					index: t
				})
			},
			setCurSong: function(t) {
				this.curSong = t, this.dispatchEvent("change:curSong", {
					curSong: t
				})
			},
			getCurIndex: function() {
				return this.curSongIndex
			},
			getCurSong: function() {
				return this.curSong
			},
			getSongList: function() {
				return this.songModels
			},
			setMode: function(t) {
				this.mode = t
			},
			getMode: function() {
				return this.mode
			},
			getLength: function() {
				return this.songModels.length
			},
			reset: function() {
				this.curSongIndex = -1, this.curSong = null, this.songModels = [], this.playlist = []
			},
			fetchLink: function(t) {
				mbox.SongDataModel.fetchSong(this.curSong, t)
			}
		})
	}(), mbox.LogModel = T.lang.createClass(function(t, e) {
		this.logUrl = "http://qianclick.baidu.com/v.gif", this.playerRules = {}, this.playerRuleCtrl = null, this.player = t, this.playList = e, this.initLog()
	}).extend({
		initLog: function() {
			var t = this;
			new mbox.PlayerLog({
				time: 100,
				resetOnNoVoice: !0,
				type: "play100ms",
				player: this.player,
				handler: function() {
					t.sendLog("playsong100ms", t.logUrl, {
						sendCurSong: !0
					})
				}
			}), new mbox.PlayerLog({
				time: 6e4,
				resetOnNoVoice: !1,
				type: "play60s",
				player: this.player,
				handler: function() {
					t.sendLog("60play", t.logUrl, {
						sendCurSong: !0
					})
				}
			}), this.player.setEventListener("setUrl", function() {
				t.sendLog("playstart", t.logUrl, {
					sendCurSong: !0
				})
			})
		},
		_addCurSong: function(t) {
			var e = {
					song_id: "songId",
					song_title: "songName",
					singer_id: "artistId",
					singer_name: "artistName",
					album_id: "albumId",
					album_name: "albumName",
					copytype: "copyType",
					format: "format",
					queryid: "queryId",
					rate: "rate",
					relatestatus: "relateStatus",
					resourcetype: "resourceType",
					songsize: "size",
					linkCode: "linkCode",
					lrcLink: "lrcLink",
					time: "time",
					status: "status",
					from: "from",
					link: "songLink"
				},
				i = this.playList.getCurSong();
			T.object.each(e, function(e, n) {
				t.push(n + "=" + encodeURIComponent(null == i[e] ? "" : i[e]))
			})
		},
		sendLog: function() {}
	}), mbox.PlayerLog = function(t) {
		this.type = t.type, this.time = t.time, this.resetOnNoVoice = t.resetOnNoVoice, this.player = t.player, this.active = !1, this.timer = null, this.handlers = [], t.handler && this.handlers.push(t.handler), this._init()
	}, mbox.PlayerLog.prototype = {
		_init: function() {
			this.timer || null == this.time || (this.timer = new mbox.Timer(this.time, 1), this.addHandler(this.handler), this.timer.addEventListener("timer", T.fn.bind(function() {
				for(var t = 0, e = this.handlers.length; e > t; t++) this.handlers[t] && this.handlers[t].apply(this, arguments)
			}, this)));
			var t = this.player.EVENTS.STATECHANGE,
				e = this.player.STATES;
			this.player.setEventListener("setUrl", T.fn.bind(function() {
				this.active = !0, this.timer.reset()
			}, this)), this.player.setEventListener(t, T.fn.bind(function(t) {
				this.active && (t.newState == e.PLAY ? this.timer.start() : this.resetOnNoVoice ? this.timer.reset() : t.newState == e.PAUSE || t.newState == e.BUFFERING ? t.oldState == e.PLAY && this.timer.pause() : this.timer.reset())
			}, this))
		},
		addHandler: function(t) {
			this.handlers.push(t)
		}
	}, mbox.PlayCtrl = mbox.lang.createClass(function(t) {
		var e = [],
			i = mbox.CONF.instanceCallName,
			n = mbox.CONF.engineArg;
		"object" != typeof window[i] && (window[i] = {}), /(macintosh|iphone|ipod|ipad)/i.test(navigator.userAgent) ? (e.push(n.audio), e.push(n.fmp)) : (e.push(n.fmp), e.push(n.audio)), this.player = window[i].player = new PlayEngine({
			subEngines: e
		}), this.player.init(), this.curSong = null, this.playList = new mbox.PlayList, this.log = new mbox.LogModel(this.player, this.playList), window[i].logger = this.log, this._init(t), mbox.CONF.exportAPI && (window[i][mbox.CONF.exportAPI] = this.exportAPI())
	}).extend({
		_init: function(t) {
			t = t || {};
			var e = this.player,
				i = this.playList,
				n = t.songId || [],
				s = mbox.SongDataModel.createSongModel(n),
				a = this,
				r = T.lang.isFunction;
			t.logOpt && T.object.extend(mbox.CONF.logOpt || {}, t.logOpt), e.setEventListener(e.EVENTS.POSITIONCHANGE, function(e) {
				var i = e.position,
					n = a.getTotalTime();
				r(t.onPositionChange) && t.onPositionChange(i, 100 * i / n || 0)
			}), r(t.onProgressChange) && e.setEventListener(e.EVENTS.PROGRESS, function(e) {
				t.onProgressChange(100 * e.progress)
			}), e.setEventListener(e.EVENTS.STATECHANGE, function(n) {
				switch(r(t.onPlayStateChange) && t.onPlayStateChange(n.newState, n.oldState), n.newState) {
					case e.STATES.END:
						mbox.CONF.autoNext ? (i.autoNext(), a.play()) : e.stop()
				}
			}), i.addEventListener("change:curSong", function(i) {
				e.stop(), (a.curSong = i.curSong) ? a.playList.fetchLink({
					success: function(e) {
						r(t.onChangeCurSong) && t.onChangeCurSong(e), a.dispatchEvent("fetch:link", {
							song: e
						})
					},
					error: function(e) {
						r(t.onChangeCurSong) && t.onChangeCurSong(null, e)
					}
				}) : r(t.onChangeCurSong) && t.onChangeCurSong(null)
			}), i.addSong(s), this.playList.setCurIndex(0), (void 0 !== t.autoPlay ? t.autoPlay : mbox.CONF.autoPlay) && this.play()
		},
		getCurSong: function() {
			return this.curSong
		},
		getTotalTime: function() {
			return this.curSong && 1e3 * this.curSong.time || this.player.getTotalTime()
		},
		setPlayIndex: function(t, e) {
			this.playList.setCurIndex(t), e && this.play()
		},
		play: function() {
			if(this.curSong && this.curSong.songLink) this.curSong.songLink !== this.player.getUrl() && (this.player.reset(), this.player.setUrl(this.curSong.songLink)), this.player.play();
			else {
				var t = this;
				this.addEventListener("fetch:link", function(e) {
					if(!e.song) throw "fetch songLink fail";
					t.player.setUrl(e.song.songLink), t.player.play(), t.removeEventListener("fetch:link.link")
				}, "link")
			}
		},
		pause: function() {
			this.player.pause()
		},
		stop: function() {
			this.player.stop()
		},
		exportAPI: function() {
			var t = this,
				e = this.player.EVENTS;
			return {
				getCurSong: function() {
					return t.curSong
				},
				getTotalTime: function() {
					return t.totalTime
				},
				getPlayerState: function() {
					return t.player.getState()
				},
				getPosition: function() {
					return t.player.getPosition()
				},
				getProgress: function() {
					return t.player.getProgress()
				},
				play: function() {
					t.play.apply(t, arguments)
				},
				pause: function() {
					t.pause()
				},
				stop: function() {
					t.stop()
				},
				listenToStateChange: function(i) {
					t.player.setEventListener(e.STATECHANGE, i)
				},
				listenToPosChange: function(i) {
					t.player.setEventListener(e.POSITIONCHAGNE, i)
				},
				listenToLoadedPercentChange: function(i) {
					t.player.setEventListener(e.PROGRESS, i)
				},
				getCurIndex: function() {
					return t.playList.getCurIndex()
				},
				addSong: function(e) {
					var i = T.lang.toArray(e);
					i.length && "object" != typeof i[0] && (i = mbox.SongDataModel.createSongModel(i)), t.playList.addSong(i)
				},
				removeSong: function(e) {
					t.playList.removeSong(e)
				},
				setPlayIndex: function(e, i) {
					this.setPlayIndex.call(t, e, i)
				},
				setPlayMode: function(e) {
					t.playList.setMode(e)
				}
			}
		}
	}), mbox.uiConf = {
		prefix: "mbox",
		allWidget: ["slider", "time", "volume", "mute", "title", "lrc", "album", "playList", "playBtn"],
		tpl: '<div class="mbox">                <div class="logo" ><a href="http://music.baidu.com" target="_blank" title="\u767e\u5ea6\u97f3\u4e50"></a></div>                <div class="player-main">                    <div class="album-pic mbox-album">                        <img class="pic" data-src="<%=songPicSmall%>"/>                    </div>                    <div class="right-wrapper">                        <div class="right-top">                            <div class="mbox-title player-title">                                <div class="song-name song-info" songid="<%=songId%>"><a href="http://music.baidu.com/song/<%=songId%>" target="_blank"><%=songName%></a></div>                                <span class="artist song-info">\u6b4c\u624b\uff1a<span class="artist-name"><%var i =0, len = all_artist.length; for(;len -i; i++){%>                                    <a href="<%=all_artist_link[i]%>" target="_blank"><%=all_artist[i]%></a><%};%></span></span>                                <span class="album song-info">\u4e13\u8f91\uff1a<span class="album-name"><a href="<%=albumLink%>" target="_blank"><%=albumName%></a></span></span>                                <span class="source song-info">\u6765\u6e90\uff1a<span class="link-source"><a href="javascript:void(0)"></a></span></span>                                <div class="lrc"></div>                            </div>                            <div class="button-wrapper">                                <a class="button add-favour" href="javascript:void(0)" onclick="return false;" title="\u70b9\u51fb\u6536\u85cf"></a>                                <a class="button lrc-btn" href="javascript:void(0)" target="_blank" onclick="return false;" title="\u67e5\u770b\u5168\u90e8\u6b4c\u8bcd"></a>                                <a class="button download-btn" href="javascript:void(0)" target="_blank" onclick="return false;" title="\u4e0b\u8f7d\u6b4c\u66f2"></a>                                <a class="button go-to-listen-btn" href="javascript:void(0)" target="_blank" onclick="return false;" title="\u5f39\u51fa\u64ad\u653e"></a>                            </div>                        </div>                        <div class="bottom-bars">                            <div class="bottom-bars-item mbox-playBtn ctrl-btn stop"><a href="javascript:void(0)" onclick="return false;"></a></div>                            <div class="bottom-bars-item  progress "><div class="slider-wrapper mbox-slider"></div></div>                            <div class="bottom-bars-item mbox-time time"><%=curTime%>/<%=totalTime%></div>                            <div class="bottom-bars-item volume">                                <a class="volume-btn mbox-mute" href="javascript:void(0)" onclick="return false;"  title="">&nbsp</a>                                <div class="slider-wrapper mbox-volume"></div>                            </div>                        </div>                    </div>                </div>                </div>'
	},
	function(t) {
		var e = "undefined" == typeof module ? t.baidu = t.baidu || {} : module.exports;
		e.template = function(e, n) {
			var s = function() {
					if(!t.document) return i._compile(e);
					var n = document.getElementById(e);
					if(n) {
						if(i.cache[e]) return i.cache[e];
						var s = /^(textarea|input)$/i.test(n.nodeName) ? n.value : n.innerHTML;
						return i._compile(s)
					}
					return i._compile(e)
				}(),
				a = i._isObject(n) ? s(n) : s;
			return s = null, a
		};
		var i = e.template;
		i.versions = i.versions || [], i.versions.push("1.0.6"), i.cache = {}, i.LEFT_DELIMITER = i.LEFT_DELIMITER || "<%", i.RIGHT_DELIMITER = i.RIGHT_DELIMITER || "%>", i.ESCAPE = !0, i._encodeHTML = function(t) {
			return String(t).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\\/g, "&#92;").replace(/"/g, "&quot;").replace(/'/g, "&#39;")
		}, i._encodeReg = function(t) {
			return String(t).replace(/([.*+?^=!:${}()|[\]/\\])/g, "\\$1")
		}, i._encodeEventHTML = function(t) {
			return String(t).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/\\\\/g, "\\").replace(/\\\//g, "/").replace(/\\n/g, "\n").replace(/\\r/g, "\r")
		}, i._compile = function(t) {
			var e = "var _template_fun_array=[];\nvar fn=(function(__data__){\nvar _template_varName='';\nfor(name in __data__){\n_template_varName+=('var '+name+'=__data__[\"'+name+'\"];');\n};\neval(_template_varName);\n_template_fun_array.push('" + i._analysisStr(t) + "');\n_template_varName=null;\n})(_template_object);\nfn = null;\nreturn _template_fun_array.join('');\n";
			return new Function("_template_object", e)
		}, i._isObject = function(t) {
			return "function" == typeof t || !(!t || "object" != typeof t)
		}, i._analysisStr = function(t) {
			var e = i.LEFT_DELIMITER,
				n = i.RIGHT_DELIMITER,
				s = i._encodeReg(e),
				a = i._encodeReg(n);
			return t = String(t).replace(new RegExp("(" + s + "[^" + a + "]*)//.*\n", "g"), "$1").replace(new RegExp("<!--.*?-->", "g"), "").replace(new RegExp(s + "\\*.*?\\*" + a, "g"), "").replace(new RegExp("[\\r\\t\\n]", "g"), "").replace(new RegExp(s + "(?:(?!" + a + ")[\\s\\S])*" + a + "|((?:(?!" + s + ")[\\s\\S])+)", "g"), function(t, e) {
				var i = "";
				if(e)
					for(i = e.replace(/\\/g, "&#92;").replace(/'/g, "&#39;");
						/<[^<]*?&#39;[^<]*?>/g.test(i);) i = i.replace(/(<[^<]*?)&#39;([^<]*?>)/g, "$1\r$2");
				else i = t;
				return i
			}), t = t.replace(new RegExp("(" + s + "[\\s]*?var[\\s]*?.*?[\\s]*?[^;])[\\s]*?" + a, "g"), "$1;" + n).replace(new RegExp("(" + s + ":?[hvu]?[\\s]*?=[\\s]*?[^;|" + a + "]*?);[\\s]*?" + a, "g"), "$1" + n).split(e).join("	"), t = i.ESCAPE ? t.replace(new RegExp("\\t=(.*?)" + a, "g"), "',typeof($1) === 'undefined'?'':baidu.template._encodeHTML($1),'") : t.replace(new RegExp("\\t=(.*?)" + a, "g"), "',typeof($1) === 'undefined'?'':$1,'"), t = t.replace(new RegExp("\\t:h=(.*?)" + a, "g"), "',typeof($1) === 'undefined'?'':baidu.template._encodeHTML($1),'").replace(new RegExp("\\t(?::=|-)(.*?)" + a, "g"), "',typeof($1)==='undefined'?'':$1,'").replace(new RegExp("\\t:u=(.*?)" + a, "g"), "',typeof($1)==='undefined'?'':encodeURIComponent($1),'").replace(new RegExp("\\t:v=(.*?)" + a, "g"), "',typeof($1)==='undefined'?'':baidu.template._encodeEventHTML($1),'").split("	").join("');").split(n).join("_template_fun_array.push('").split("\r").join("\\'")
		}
	}(window),
	function(t, e) {
		t.widget && "function" === t.widget && (t.box_widget = t.widget);
		var i = 0,
			n = Array.prototype.slice,
			s = t.cleanData;
		t.cleanData = function(e) {
			for(var i, n = 0; null != (i = e[n]); n++) try {
				t(i).triggerHandler("remove")
			} catch(a) {}
			s(e)
		}, t.box_widget = function(e, i, n) {
			var s, a, r, o, u = e.split(".")[0];
			e = e.split(".")[1], s = u + "-" + e, n || (n = i, i = t.Widget), t.expr[":"][s.toLowerCase()] = function(e) {
				return !!t.data(e, s)
			}, t[u] = t[u] || {}, a = t[u][e], r = t[u][e] = function(t, e) {
				return this._createWidget ? (arguments.length && this._createWidget(t, e), void 0) : new r(t, e)
			}, t.extend(r, a, {
				version: n.version,
				_proto: t.extend({}, n),
				_childConstructors: []
			}), o = new i, o.options = t.box_widget.extend({}, o.options), t.each(n, function(e, s) {
				t.isFunction(s) && (n[e] = function() {
					var t = function() {
							return i.prototype[e].apply(this, arguments)
						},
						n = function(t) {
							return i.prototype[e].apply(this, t)
						};
					return function() {
						var e, i = this._super,
							a = this._superApply;
						return this._super = t, this._superApply = n, e = s.apply(this, arguments), this._super = i, this._superApply = a, e
					}
				}())
			}), r.prototype = t.box_widget.extend(o, {
				widgetEventPrefix: e
			}, n, {
				constructor: r,
				namespace: u,
				widgetName: e,
				widgetBaseClass: s,
				widgetFullName: s
			}), a ? (t.each(a._childConstructors, function(e, i) {
				var n = i.prototype;
				t.box_widget(n.namespace + "." + n.widgetName, r, i._proto)
			}), delete a._childConstructors) : i._childConstructors.push(r), t.box_widget.bridge(e, r)
		}, t.box_widget.extend = function(i) {
			for(var s, a, r = n.call(arguments, 1), o = 0, u = r.length; u > o; o++)
				for(s in r[o]) a = r[o][s], r[o].hasOwnProperty(s) && a !== e && (i[s] = t.isPlainObject(a) ? t.box_widget.extend({}, i[s], a) : a);
			return i
		}, t.box_widget.bridge = function(i, s) {
			var a = s.prototype.widgetFullName;
			t.fn[i] = function(r) {
				var o = "string" == typeof r,
					u = n.call(arguments, 1),
					l = this;
				return r = !o && u.length ? t.box_widget.extend.apply(null, [r].concat(u)) : r, o ? this.each(function() {
					var n, s = t.data(this, a);
					return s ? t.isFunction(s[r]) && "_" !== r.charAt(0) ? (n = s[r].apply(s, u), n !== s && n !== e ? (l = n && n.jquery ? l.pushStack(n.get()) : n, !1) : void 0) : t.error("no such method '" + r + "' for " + i + " widget instance") : t.error("cannot call methods on " + i + " prior to initialization; attempted to call method '" + r + "'")
				}) : this.each(function() {
					var e = t.data(this, a);
					e ? e.option(r || {})._init() : new s(r, this)
				}), l
			}
		}, t.Widget = function() {}, t.Widget._childConstructors = [], t.Widget.prototype = {
			widgetName: "widget",
			widgetEventPrefix: "",
			defaultElement: "<div>",
			options: {
				disabled: !1,
				create: null
			},
			_createWidget: function(e, n) {
				n = t(n || this.defaultElement || this)[0], this.element = t(n), this.uuid = i++, this.eventNamespace = "." + this.widgetName + this.uuid, this.options = t.box_widget.extend({}, this.options, this._getCreateOptions(), e), this.bindings = t(), this.hoverable = t(), this.focusable = t(), n !== this && (t.data(n, this.widgetName, this), t.data(n, this.widgetFullName, this), this._on({
					remove: "destroy"
				}), this.document = t(n.style ? n.ownerDocument : n.document || n), this.window = t(this.document[0].defaultView || this.document[0].parentWindow)), this._create(), this._trigger("create", null, this._getCreateEventData()), this._init()
			},
			_getCreateOptions: t.noop,
			_getCreateEventData: t.noop,
			_create: t.noop,
			_init: t.noop,
			destroy: function() {
				this._destroy(), this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)), this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName + "-disabled ui-state-disabled"), this.bindings.unbind(this.eventNamespace), this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus")
			},
			_destroy: t.noop,
			widget: function() {
				return this.element
			},
			option: function(i, n) {
				var s, a, r, o = i;
				if(0 === arguments.length) return t.box_widget.extend({}, this.options);
				if("string" == typeof i)
					if(o = {}, s = i.split("."), i = s.shift(), s.length) {
						for(a = o[i] = t.box_widget.extend({}, this.options[i]), r = 0; r < s.length - 1; r++) a[s[r]] = a[s[r]] || {}, a = a[s[r]];
						if(i = s.pop(), n === e) return a[i] === e ? null : a[i];
						a[i] = n
					} else {
						if(n === e) return this.options[i] === e ? null : this.options[i];
						o[i] = n
					}
				return this._setOptions(o), this
			},
			_setOptions: function(t) {
				var e;
				for(e in t) this._setOption(e, t[e]);
				return this
			},
			_setOption: function(t, e) {
				return this.options[t] = e, "disabled" === t && (this.widget().toggleClass(this.widgetFullName + "-disabled ui-state-disabled", !!e).attr("aria-disabled", e), this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus")), this
			},
			enable: function() {
				return this._setOption("disabled", !1)
			},
			disable: function() {
				return this._setOption("disabled", !0)
			},
			_on: function(e, i) {
				i ? (e = t(e), this.bindings = this.bindings.add(e)) : (i = e, e = this.element);
				var n = this;
				t.each(i, function(i, s) {
					function a() {
						return n.options.disabled === !0 || t(this).hasClass("ui-state-disabled") ? void 0 : ("string" == typeof s ? n[s] : s).apply(n, arguments)
					}
					"string" != typeof s && (a.guid = s.guid = s.guid || a.guid || t.guid++);
					var r = i.match(/^(\w+)\s*(.*)$/),
						o = r[1] + n.eventNamespace,
						u = r[2];
					u ? n.widget().delegate(u, o, a) : e.bind(o, a)
				})
			},
			_off: function(t, e) {
				e = (e || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace, t.unbind(e).undelegate(e)
			},
			_delay: function(t, e) {
				function i() {
					return("string" == typeof t ? n[t] : t).apply(n, arguments)
				}
				var n = this;
				return setTimeout(i, e || 0)
			},
			_hoverable: function(e) {
				this.hoverable = this.hoverable.add(e), this._on(e, {
					mouseenter: function(e) {
						t(e.currentTarget).addClass("ui-state-hover")
					},
					mouseleave: function(e) {
						t(e.currentTarget).removeClass("ui-state-hover")
					}
				})
			},
			_focusable: function(e) {
				this.focusable = this.focusable.add(e), this._on(e, {
					focusin: function(e) {
						t(e.currentTarget).addClass("ui-state-focus")
					},
					focusout: function(e) {
						t(e.currentTarget).removeClass("ui-state-focus")
					}
				})
			},
			_trigger: function(e, i, n) {
				var s, a, r = this.options[e];
				if(n = n || {}, i = t.Event(i), i.type = (e === this.widgetEventPrefix ? e : this.widgetEventPrefix + e).toLowerCase(), i.target = this.element[0], a = i.originalEvent)
					for(s in a) s in i || (i[s] = a[s]);
				return this.element.trigger(i, n), !(t.isFunction(r) && r.apply(this.element[0], [i].concat(n)) === !1 || i.isDefaultPrevented())
			}
		}, t.each({
			show: "fadeIn",
			hide: "fadeOut"
		}, function(e, i) {
			t.Widget.prototype["_" + e] = function(n, s, a) {
				"string" == typeof s && (s = {
					effect: s
				});
				var r, o = s ? s === !0 || "number" == typeof s ? i : s.effect || i : e;
				s = s || {}, "number" == typeof s && (s = {
					duration: s
				}), r = !t.isEmptyObject(s), s.complete = a, s.delay && n.delay(s.delay), r && t.effects && (t.effects.effect[o] || t.uiBackCompat !== !1 && t.effects[o]) ? n[e](s) : o !== e && n[o] ? n[o](s.duration, s.easing, a) : n.queue(function(i) {
					t(this)[e](), a && a.call(n[0]), i()
				})
			}
		}), t.uiBackCompat !== !1 && (t.Widget.prototype._getCreateOptions = function() {
			return t.metadata && t.metadata.get(this.element[0])[this.widgetName]
		})
	}(jQuery),
	function(t) {
		var e = !1;
		t(document).mouseup(function() {
			e = !1
		}), t.box_widget("ui.box_mouse", {
			options: {
				cancel: ":input,option",
				distance: 1,
				delay: 0
			},
			_mouseInit: function() {
				var e = this;
				this.element.bind("mousedown." + this.widgetName, function(t) {
					return e._mouseDown(t)
				}).bind("click." + this.widgetName, function(i) {
					return !0 === t.data(i.target, e.widgetName + ".preventClickEvent") ? (t.removeData(i.target, e.widgetName + ".preventClickEvent"), i.stopImmediatePropagation(), !1) : void 0
				}), this.started = !1
			},
			_mouseDestroy: function() {
				this.element.unbind("." + this.widgetName), t(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate)
			},
			_mouseDown: function(i) {
				if(!e) {
					this._mouseStarted && this._mouseUp(i), this._mouseDownEvent = i;
					var n = this,
						s = 1 == i.which,
						a = "string" == typeof this.options.cancel && i.target.nodeName ? t(i.target).closest(this.options.cancel).length : !1;
					return s && !a && this._mouseCapture(i) ? (this.mouseDelayMet = !this.options.delay, this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function() {
						n.mouseDelayMet = !0
					}, this.options.delay)), this._mouseDistanceMet(i) && this._mouseDelayMet(i) && (this._mouseStarted = this._mouseStart(i) !== !1, !this._mouseStarted) ? (i.preventDefault(), !0) : (!0 === t.data(i.target, this.widgetName + ".preventClickEvent") && t.removeData(i.target, this.widgetName + ".preventClickEvent"), this._mouseMoveDelegate = function(t) {
						return n._mouseMove(t)
					}, this._mouseUpDelegate = function(t) {
						return n._mouseUp(t)
					}, t(document).bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate), i.preventDefault(), e = !0, !0)) : !0
				}
			},
			_mouseMove: function(e) {
				return !t.browser.msie || document.documentMode >= 9 || e.button ? this._mouseStarted ? (this._mouseDrag(e), e.preventDefault()) : (this._mouseDistanceMet(e) && this._mouseDelayMet(e) && (this._mouseStarted = this._mouseStart(this._mouseDownEvent, e) !== !1, this._mouseStarted ? this._mouseDrag(e) : this._mouseUp(e)), !this._mouseStarted) : this._mouseUp(e)
			},
			_mouseUp: function(e) {
				return t(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate), this._mouseStarted && (this._mouseStarted = !1, e.target == this._mouseDownEvent.target && t.data(e.target, this.widgetName + ".preventClickEvent", !0), this._mouseStop(e)), !1
			},
			_mouseDistanceMet: function(t) {
				return Math.max(Math.abs(this._mouseDownEvent.pageX - t.pageX), Math.abs(this._mouseDownEvent.pageY - t.pageY)) >= this.options.distance
			},
			_mouseDelayMet: function() {
				return this.mouseDelayMet
			},
			_mouseStart: function() {},
			_mouseDrag: function() {},
			_mouseStop: function() {},
			_mouseCapture: function() {
				return !0
			}
		})
	}(jQuery),
	function(t) {
		var e = 5;
		t.box_widget("ui.box_slider", t.ui.box_mouse, {
			widgetEventPrefix: "slide",
			options: {
				animate: !1,
				distance: 0,
				max: 100,
				min: 0,
				orientation: "horizontal",
				progressbar: !1,
				progress: 0,
				constraintProgress: !1,
				range: !1,
				step: 1,
				value: 0,
				values: null
			},
			_create: function() {
				var i = this,
					n = this.options,
					s = this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),
					a = "<a class='ui-slider-handle ui-state-default ui-corner-all' hidefocus='true'><span></span></a>",
					r = n.values && n.values.length || 1,
					o = [];
				this._keySliding = !1, this._mouseSliding = !1, this._animateOff = !0, this._handleIndex = null, this._detectOrientation(), this._mouseInit(), this.element.addClass("ui-slider ui-slider-" + this.orientation + " ui-widget ui-widget-content ui-corner-all" + (n.disabled ? " ui-slider-disabled ui-disabled" : "")), this.range = t([]), n.range && (n.range === !0 && (n.values || (n.values = [this._valueMin(), this._valueMin()]), n.values.length && 2 !== n.values.length && (n.values = [n.values[0], n.values[0]])), this.range = t("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header" + ("min" === n.range || "max" === n.range ? " ui-slider-range-" + n.range : ""))), n.progressbar && (this.progressbar = t("<div></div>").appendTo(this.element).addClass("ui-slider-progressbar ui-widget-header"));
				for(var u = s.length; r > u; u += 1) o.push(a);
				this.handles = s.add(t(o.join("")).appendTo(i.element)), this.handle = this.handles.eq(0), this.handles.add(this.range).filter("a").click(function(t) {
					t.preventDefault()
				}).hover(function() {
					n.disabled || t(this).addClass("ui-state-hover ui-slider-handle-hover")
				}, function() {
					t(this).removeClass("ui-state-hover ui-slider-handle-hover")
				}).focus(function() {
					n.disabled ? t(this).blur() : (t(".ui-slider .ui-state-focus").removeClass("ui-state-focus ui-slider-handle-focus"), t(this).addClass("ui-state-focus ui-slider-handle-focus"))
				}).blur(function() {
					t(this).removeClass("ui-state-focus ui-slider-handle-focus")
				}), this.handles.each(function(e) {
					t(this).data("index.ui-slider-handle", e)
				}), this.handles.keydown(function(n) {
					var s, a, r, o, u = t(this).data("index.ui-slider-handle");
					if(!i.options.disabled) {
						switch(n.keyCode) {
							case t.ui.keyCode.HOME:
							case t.ui.keyCode.END:
							case t.ui.keyCode.PAGE_UP:
							case t.ui.keyCode.PAGE_DOWN:
							case t.ui.keyCode.UP:
							case t.ui.keyCode.RIGHT:
							case t.ui.keyCode.DOWN:
							case t.ui.keyCode.LEFT:
								if(n.preventDefault(), !i._keySliding && (i._keySliding = !0, t(this).addClass("ui-state-active ui-slider-handle-active"), s = i._start(n, u), s === !1)) return
						}
						switch(o = i.options.step, a = r = i.options.values && i.options.values.length ? i.values(u) : i.value(), n.keyCode) {
							case t.ui.keyCode.HOME:
								r = i._valueMin();
								break;
							case t.ui.keyCode.END:
								r = i._valueMax();
								break;
							case t.ui.keyCode.PAGE_UP:
								r = i._trimAlignValue(a + (i._valueMax() - i._valueMin()) / e);
								break;
							case t.ui.keyCode.PAGE_DOWN:
								r = i._trimAlignValue(a - (i._valueMax() - i._valueMin()) / e);
								break;
							case t.ui.keyCode.UP:
							case t.ui.keyCode.RIGHT:
								if(a === i._valueMax()) return;
								r = i._trimAlignValue(a + o);
								break;
							case t.ui.keyCode.DOWN:
							case t.ui.keyCode.LEFT:
								if(a === i._valueMin()) return;
								r = i._trimAlignValue(a - o)
						}
						i._slide(n, u, r)
					}
				}).keyup(function(e) {
					var n = t(this).data("index.ui-slider-handle");
					i._keySliding && (i._keySliding = !1, i._stop(e, n), i._change(e, n), t(this).removeClass("ui-state-active ui-slider-handle-active"))
				}), this._refreshValue(), this._refreshProgress(), this._animateOff = !1
			},
			destroy: function() {
				return this.handles.remove(), this.range.remove(), this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider"), this._mouseDestroy(), this
			},
			_mouseCapture: function(e) {
				var i, n, s, a, r, o, u, l, h, d = this.options;
				return d.disabled ? !1 : (this.elementSize = {
					width: this.element.outerWidth(),
					height: this.element.outerHeight()
				}, this.elementOffset = this.element.offset(), i = {
					x: e.pageX,
					y: e.pageY
				}, n = this._normValueFromMouse(i), s = this._valueMax() - this._valueMin() + 1, r = this, this.handles.each(function(e) {
					var i = Math.abs(n - r.values(e));
					s > i && (s = i, a = t(this), o = e)
				}), d.range === !0 && this.values(1) === d.min && (o += 1, a = t(this.handles[o])), u = this._start(e, o), u === !1 ? !1 : (this._mouseSliding = !0, r._handleIndex = o, a.addClass("ui-state-active ui-slider-handle-active").focus(), l = a.offset(), h = !t(e.target).parents().andSelf().is(".ui-slider-handle"), this._clickOffset = h ? {
					left: 0,
					top: 0
				} : {
					left: e.pageX - l.left - a.width() / 2,
					top: e.pageY - l.top - a.height() / 2 - (parseInt(a.css("borderTopWidth"), 10) || 0) - (parseInt(a.css("borderBottomWidth"), 10) || 0) + (parseInt(a.css("marginTop"), 10) || 0)
				}, this.handles.hasClass("ui-state-hover") || this._slide(e, o, n), this._animateOff = !0, !0))
			},
			_mouseStart: function() {
				return !0
			},
			_mouseDrag: function(t) {
				var e = {
						x: t.pageX,
						y: t.pageY
					},
					i = this._normValueFromMouse(e);
				return this._slide(t, this._handleIndex, i), !1
			},
			_mouseStop: function(t) {
				return this.handles.removeClass("ui-state-active ui-slider-handle-active"), this._mouseSliding = !1, this._stop(t, this._handleIndex), this._change(t, this._handleIndex), this._handleIndex = null, this._clickOffset = null, this._animateOff = !1, !1
			},
			_detectOrientation: function() {
				this.orientation = "vertical" === this.options.orientation ? "vertical" : "horizontal"
			},
			_normValueFromMouse: function(t) {
				var e, i, n, s, a;
				return "horizontal" === this.orientation ? (e = this.elementSize.width, i = t.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0)) : (e = this.elementSize.height, i = t.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0)), n = i / e, n > 1 && (n = 1), 0 > n && (n = 0), "vertical" === this.orientation && (n = 1 - n), s = this._valueMax() - this._valueMin(), a = this._valueMin() + n * s, this._trimAlignValue(a)
			},
			_start: function(t, e) {
				var i = {
					handle: this.handles[e],
					value: this.value()
				};
				return this.options.values && this.options.values.length && (i.value = this.values(e), i.values = this.values()), this._trigger("start", t, i)
			},
			_slide: function(t, e, i) {
				var n, s, a;
				this.options.values && this.options.values.length ? (n = this.values(e ? 0 : 1), 2 === this.options.values.length && this.options.range === !0 && (0 === e && i > n || 1 === e && n > i) && (i = n), i !== this.values(e) && (s = this.values(), s[e] = i, a = this._trigger("slide", t, {
					handle: this.handles[e],
					value: i,
					values: s
				}), n = this.values(e ? 0 : 1), a !== !1 && this.values(e, i, !0))) : i !== this.value() && (a = this._trigger("slide", t, {
					handle: this.handles[e],
					value: i
				}), a !== !1 && this.value(i))
			},
			_stop: function(t, e) {
				var i = {
					handle: this.handles[e],
					value: this.value()
				};
				this.options.values && this.options.values.length && (i.value = this.values(e), i.values = this.values()), this._trigger("stop", t, i)
			},
			_change: function(t, e) {
				if(!this._keySliding && !this._mouseSliding) {
					var i = {
						handle: this.handles[e],
						value: this.value()
					};
					this.options.values && this.options.values.length && (i.value = this.values(e), i.values = this.values()), this._trigger("change", t, i)
				}
			},
			_progress: function(t) {
				var e = {
					progress: this.options.progress
				};
				this._trigger("progress", t, e)
			},
			progress: function(t) {
				var e = this._trimAlignProgress(t);
				return arguments.length && this.options.progress != e ? (this.options.progress = e, this._refreshProgress(), this._progress(null), this.options.constraintProgress && this.value() > e && this.value(e), void 0) : this.options.progress
			},
			value: function(t) {
				return arguments.length ? (this.options.value = this._trimAlignValue(t), this._refreshValue(), this._change(null, 0), void 0) : this._value()
			},
			values: function(e, i) {
				var n, s, a;
				if(arguments.length > 1) return this.options.values[e] = this._trimAlignValue(i), this._refreshValue(), this._change(null, e), void 0;
				if(!arguments.length) return this._values();
				if(!t.isArray(arguments[0])) return this.options.values && this.options.values.length ? this._values(e) : this.value();
				for(n = this.options.values, s = arguments[0], a = 0; a < n.length; a += 1) n[a] = this._trimAlignValue(s[a]), this._change(null, a);
				this._refreshValue()
			},
			_setOption: function(e, i) {
				var n, s = 0;
				switch(t.isArray(this.options.values) && (s = this.options.values.length), t.Widget.prototype._setOption.apply(this, arguments), e) {
					case "disabled":
						i ? (this.handles.filter(".ui-state-focus").blur(), this.handles.removeClass("ui-state-hover ui-slider-handle-hover"), this.handles.propAttr("disabled", !0), this.element.addClass("ui-disabled")) : (this.handles.propAttr("disabled", !1), this.element.removeClass("ui-disabled"));
						break;
					case "orientation":
						this._detectOrientation(), this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-" + this.orientation), this._refreshValue(), this._refreshProgress();
						break;
					case "value":
						this._animateOff = !0, this._refreshValue(), this._change(null, 0), this._animateOff = !1;
						break;
					case "values":
						for(this._animateOff = !0, this._refreshValue(), n = 0; s > n; n += 1) this._change(null, n);
						this._animateOff = !1;
						break;
					case "progress":
						this._refreshProgress(), this._progress(null), this.options.constraintProgress && this.options.value > this.options.progress && (this._animateOff = !0, this.value(this.options.progress), this._animateOff = !1);
						break;
					case "min":
					case "max":
						this._animateOff = !0, this._refreshValue(), this._refreshProgress(), this._animateOff = !1
				}
			},
			_value: function() {
				var t = this.options.value;
				return t = this._trimAlignValue(t)
			},
			_values: function(t) {
				var e, i, n;
				if(arguments.length) return e = this.options.values[t], e = this._trimAlignValue(e);
				for(i = this.options.values.slice(), n = 0; n < i.length; n += 1) i[n] = this._trimAlignValue(i[n]);
				return i
			},
			_trimAlignValue: function(t) {
				if(t <= this._valueMin()) return this._valueMin();
				if(!this.options.constraintProgress && t >= this._valueMax()) return this._valueMax();
				this.options.progressbar && this.options.constraintProgress && t >= this.options.progress && (t = this.options.progress);
				var e = this.options.step > 0 ? this.options.step : 1,
					i = (t - this._valueMin()) % e,
					n = t - i;
				return 2 * Math.abs(i) >= e && (n += i > 0 ? e : -e), parseFloat(n.toFixed(5))
			},
			_trimAlignProgress: function(t) {
				return t <= this._valueMin() ? this._valueMin() : t >= this._valueMax() ? this._valueMax() : t
			},
			_valueMin: function() {
				return this.options.min
			},
			_valueMax: function() {
				return this.options.max
			},
			_refreshValue: function() {
				var e, i, n, s, a, r = this.options.range,
					o = this.options,
					u = this,
					l = this._animateOff ? !1 : o.animate,
					h = {};
				this.options.values && this.options.values.length ? this.handles.each(function(n) {
					e = (u.values(n) - u._valueMin()) / (u._valueMax() - u._valueMin()) * 100, h["horizontal" === u.orientation ? "left" : "bottom"] = e + "%", t(this).stop(1, 1)[l ? "animate" : "css"](h, o.animate), u.options.range === !0 && ("horizontal" === u.orientation ? (0 === n && u.range.stop(1, 1)[l ? "animate" : "css"]({
						left: e + "%"
					}, o.animate), 1 === n && u.range[l ? "animate" : "css"]({
						width: e - i + "%"
					}, {
						queue: !1,
						duration: o.animate
					})) : (0 === n && u.range.stop(1, 1)[l ? "animate" : "css"]({
						bottom: e + "%"
					}, o.animate), 1 === n && u.range[l ? "animate" : "css"]({
						height: e - i + "%"
					}, {
						queue: !1,
						duration: o.animate
					}))), i = e
				}) : (n = this.value(), s = this._valueMin(), a = this._valueMax(), e = a !== s ? (n - s) / (a - s) * 100 : 0, h["horizontal" === u.orientation ? "left" : "bottom"] = e + "%", this.handle.stop(1, 0)[l ? "animate" : "css"](h, o.animate), "min" === r && "horizontal" === this.orientation && this.range.stop(1, 0)[l ? "animate" : "css"]({
					width: e + "%"
				}, o.animate), "max" === r && "horizontal" === this.orientation && this.range[l ? "animate" : "css"]({
					width: 100 - e + "%"
				}, {
					queue: !1,
					duration: o.animate
				}), "min" === r && "vertical" === this.orientation && this.range.stop(1, 0)[l ? "animate" : "css"]({
					height: e + "%"
				}, o.animate), "max" === r && "vertical" === this.orientation && this.range[l ? "animate" : "css"]({
					height: 100 - e + "%"
				}, {
					queue: !1,
					duration: o.animate
				}))
			},
			_refreshProgress: function() {
				var t = this.options,
					e = this._valueMax(),
					i = t.progress,
					n = i / e * 100;
				this.progressbar && ("horizontal" === this.orientation ? this.progressbar.css({
					width: n + "%"
				}) : this.progressbar.css({
					height: n + "%"
				}))
			},
			setLoading: function(t, e) {
				var i;
				arguments.length <= 1 ? (e = t, i = this.handle) : i = this.handles.eq(t), i[e ? "addClass" : "removeClass"]("ui-slider-handle-loading")
			}
		}), t.extend(t.ui.box_slider, {
			version: "1.8.20"
		})
	}(jQuery),
	function(t) {
		t.cutString = function(t, e, i) {
			var n, s, a, r = t.length,
				o = 0,
				u = 0;
			for(s = 0; r > s; s++)
				if(o += t.charCodeAt(s) > 128 ? 2 : 1, o > e) {
					n = t.substring(0, s - 1) + "...";
					break
				}
			for(a = r; a > 0; a--) {
				if(s >= a || 0 === i) return n;
				if(u += t.charCodeAt(s) > 128 ? 2 : 1, u > i) return n += t.substring(a)
			}
			return t
		}
	}(jQuery), mbox.UiCtrl = mbox.lang.createClass(function(t, e) {
		this.guid = "mbox_ui_" + setTimeout(function() {}, 0), this.conf = e || mbox.uiConf, this.conf && (this.widget = {}, this._init(t), this.EVENTS = {
			POSITIONCHANGE: "ui_poschange",
			TOGGLEPLAY: "ui_toggleplay",
			VOLCHANGE: "ui_volchange",
			MUTECHANGE: "ui_mutechange"
		}, this.volume = 80, this.$root = $(t), this.active = !1)
	}).extend({
		_init: function(t) {
			if(this.conf.tpl) {
				for(var e = $(this.conf.tpl).appendTo(t || "body").css("display", "none"), i = this.conf.allWidget, n = this.conf.prefix, s = {}, a = i.length - 1; a > -1; a--) {
					var r = e.find("." + n + "-" + i[a]),
						o = r.html();
					o = o && o.replace(/&lt;%/g, "<%").replace(/%&gt;/g, "%>"), s[i[a]] = {
						dom: r,
						tpl: o
					}
				}
				this.conf.domJson = s, e.css("display", "block"), this.$root = e
			}
			var u = this.conf.domJson;
			for(var l in u)
				if(u.hasOwnProperty(l)) switch(l) {
					case "slider":
						this._initSlider(u[l]);
						break;
					case "volume":
						this.widget[l] = $(u[l].dom).box_slider({
							animate: !0,
							max: 100,
							min: 0,
							orientation: "horizental",
							progressbar: !1,
							range: "min",
							value: 80
						}).bind("slide", T.fn.bind(function(t, e) {
							this.active && this.fireVolChange(+e.value, 0 === +e.value)
						}, this)).bind("slidestop", T.fn.bind(function() {
							this.active || this.widget.volume.box_slider("option", "value", this.volume)
						}, this));
						break;
					case "mute":
						var h = this;
						this.widget[l] = $(u[l].dom).click(function() {
							var t = $(this).hasClass("mute");
							h.fireVolChange(h.volume, !t)
						});
						break;
					case "title":
					case "time":
					case "playList":
					case "album":
						this.widget[l] = $(u[l].dom), this.widget[l].tpl = u[l].tpl;
						break;
					case "playBtn":
						this.widget[l] = $(u[l].dom).bind("click", T.fn.bind(function() {
							var t = this.widget.playBtn.hasClass("stop");
							this.dispatchEvent(this.EVENTS.TOGGLEPLAY, {
								isPlay: t
							})
						}, this))
				}
			this.conf.tpl && this.tplToHtml()
		},
		_initSlider: function(t) {
			var e = t.maxValue || 1e4;
			this.widget.slider = $(t.dom).box_slider({
				animate: 175,
				max: e,
				min: 0,
				orientation: "horizontal",
				progressbar: !0,
				progress: 0,
				constraintProgress: !0,
				range: "min",
				value: 0
			}), this.widget.slider.maxValue = e, this.widget.slider.sliding = !1;
			var i = this;
			this.widget.slider.bind("slidestart", function() {
				i.widget.slider.isSliding = !0
			}).bind("slidestop", function(t, e) {
				i.widget.slider.isSliding = !1, i.dispatchEvent(i.EVENTS.POSITIONCHANGE, {
					percent: e.value / i.widget.slider.maxValue
				}), !i.active && i.widget.slider.box_slider("option", "value", 0)
			})
		},
		tplToHtml: function(t, e, i, n) {
			function s(t) {
				$(e).delegate("." + t, "click", function() {
					n.sendLog("click", n.logUrl, {
						pos: i[t]
					})
				})
			}
			if(this.widget.title) {
				var a = this.createSongFilter(t);
				a.songName && "\u8be5\u6b4c\u66f2\u5df2\u4e0b\u67b6" !== a.songName ? this.widget.title.removeClass("grey") : this.widget.title.addClass("grey"), this.widget.title.html(baidu.template(this.widget.title.tpl, a))
			}
			if(this.widget.lrc && this.widget.lrc.lrc("setLrc", ""), this.widget.album) {
				this.widget.album.html(baidu.template(this.widget.album.tpl, t));
				var r = this.widget.album.find("img");
				if(!r[0].src) {
					var o = r.attr("data-src");
					o && r.attr("src", o)
				}
			}
			this.widget.time && this.widget.time.html(baidu.template(this.widget.time.tpl, {
				curTime: mbox.convertTime(0),
				totalTime: mbox.convertTime(0)
			}));
			for(var u in i) s(u)
		},
		fireVolChange: function(t, e) {
			return this.active ? (this.volume = t, e ? (this.widget.mute && this.widget.mute.addClass("mute").attr("title", "\u53d6\u6d88\u9759\u97f3"), this.widget.volume && this.widget.volume.box_slider("option", "value", 0)) : (this.widget.mute && this.widget.mute.removeClass("mute").attr("title", "\u9759\u97f3"), this.widget.volume && this.widget.volume.box_slider("option", "value", this.volume)), this.dispatchEvent(this.EVENTS.VOLCHANGE, {
				volume: t
			}), this.dispatchEvent(this.EVENTS.MUTECHANGE, {
				mute: e
			}), !0) : !1
		},
		setActive: function(t) {
			this.active = t, this.$root[t ? "addClass" : "removeClass"]("active")
		},
		setShowLink: function(t, e) {
			var i = t.showLink,
				n = i ? $.cutString(i, 16, 5) : "";
			("2" == t.resourceType.toString() || void 0 === t.resourceType) && ($(e).find(".link-source").text(n).attr("href", i), $(e).find(".source").show())
		},
		createSongFilter: function(t) {
			var e, i, n = [],
				s = [],
				a = [];
			if(t) {
				e = "http://music.baidu.com/", n = t.artistId.toString().split(","), s = t.artistName.split(","), a = [];
				for(var r = 0, o = s.length; o > r; r++) a[r] = n[r] ? e + "artist/" + n[r] : "javascript:;";
				i = {
					songId: t.songId,
					songName: t.songName || "\u8be5\u6b4c\u66f2\u5df2\u4e0b\u67b6",
					albumId: t.albumId,
					albumLink: t.albumId ? e + "album/" + t.albumId : "javascript:;",
					albumName: t.albumName,
					all_artist: s,
					all_artist_id: n,
					all_artist_link: a
				}
			} else i = {
				songId: "",
				songName: "",
				albumId: "",
				albumLink: "",
				albumName: "",
				all_artist: s,
				all_artist_id: n,
				all_artist_link: a
			};
			return i
		}
	}),
	function() {
		var t = function(t, e) {
			if([].indexOf) return [].indexOf.call(t, e);
			for(var i = t.length - 1; i > -1; i--)
				if(t[i] === e) return i;
			return -1
		};
		mbox.Controller = function(t) {
			this.playctrl = t, this.uiList = []
		}, mbox.Controller.prototype = {
			_init: function() {},
			bindUi: function(e, i) {
				if(t(this.uiList, e) > -1 || !e) return !1;
				if(i && this.uiList.length > 0)
					for(var n = this.uiList.length; n; n--) this.unbindUi(this.uiList[n - 1]), this.uiList.splice(n - 1, 1);
				this.bindPlayerEvent(this.playctrl, e), this.bindSongInfoEvent(this.playctrl, e), this.bindPlayListEvent(this.playctrl, e), this.bindUIEvent(this.playctrl, e), this.uiList.push(e);
				var s = this.playctrl.player;
				return this._onPosition(e, s.getCurrentPosition()), this._onProgress(e, s.getLoadedPercent()), this._onState(e, s.getState()), e.setActive(!0), e.fireVolChange(e.volume, !e.volume), !0
			},
			unbindUi: function(t) {
				var e, i = playctrl.player,
					n = t.guid,
					s = i.EVENTS,
					a = t.EVENTS;
				for(e in s) s.hasOwnProperty(e) && i.removeEventListener(s[e] + "." + n);
				for(e in a) a.hasOwnProperty(e) && t.removeEventListener(a[e] + "." + n);
				playctrl.removeEventListener("fetch:link." + n), t.setActive(!1)
			},
			bindPlayListEvent: function() {},
			bindPlayerEvent: function(t, e) {
				var i = t.player,
					n = e.guid;
				i.setEventListener(i.EVENTS.POSITIONCHANGE, T.fn.bind(function(t) {
					this._onPosition(e, t.position)
				}, this), n), i.setEventListener(i.EVENTS.PROGRESS, T.fn.bind(function(t) {
					this._onProgress(e, t.progress)
				}, this), n), i.setEventListener(i.EVENTS.STATECHANGE, T.fn.bind(function(t) {
					this._onState(e, t.newState)
				}, this), n)
			},
			bindSongInfoEvent: function(t, e) {
				t.addEventListener("fetch:link", T.fn.bind(function(t) {
					this._onSongInfo(e, t.song)
				}, this), e.guid)
			},
			bindUIEvent: function(t, e) {
				var i = t.player;
				e.addEventListener(e.EVENTS.POSITIONCHANGE, function(e) {
					i.setCurrentPosition(t.getTotalTime() * e.percent)
				}, e.guid), e.addEventListener(e.EVENTS.VOLCHANGE, function(t) {
					i.setVolume(t.volume)
				}, e.guid), e.addEventListener(e.EVENTS.TOGGLEPLAY, function(e) {
					t.player[e.isPlay ? "play" : "pause"]()
				}, e.guid), e.addEventListener(e.EVENTS.MUTECHANGE, function(t) {
					i.setMute(t.mute)
				}, e.guid)
			},
			_onSongInfo: function(t, e) {
				if(t.widget.title) {
					var i = t.createSongFilter(e);
					i.songName && "\u8be5\u6b4c\u66f2\u5df2\u4e0b\u67b6" !== i.songName ? t.widget.title.removeClass("grey") : t.widget.title.addClass("grey"), t.widget.title.html(baidu.template(t.widget.title.tpl, i))
				}
				if(t.widget.lrc && e && mbox.SongDataModel.getLrcContent(e, {
						success: function(e) {
							t.widget.lrc.lrc("setLrc", e)
						},
						error: function() {
							t.widget.lrc.lrc("setLrc", "")
						}
					}), t.widget.album) {
					t.widget.album.html(baidu.template(t.widget.album.tpl, e));
					var n = t.widget.album.find("img");
					if(!n[0].src) {
						var s = n.attr("data-src");
						s && n.attr("src", s)
					}
				}
				if(t.widget.time) {
					var a = this.playctrl.getTotalTime();
					t.widget.time.html(baidu.template(t.widget.time.tpl, {
						curTime: mbox.convertTime(0),
						totalTime: mbox.convertTime(a)
					}))
				}
			},
			_onPosition: function(t, e) {
				var i = this.playctrl.getTotalTime();
				t.widget.slider && !t.widget.slider.isSliding && t.widget.slider.box_slider("option", "value", e * t.widget.slider.maxValue / i || 0), t.widget.lrc && t.widget.lrc.lrc("scrollTo", e), t.widget.time && t.widget.time.html(baidu.template(t.widget.time.tpl, {
					curTime: mbox.convertTime(e),
					totalTime: mbox.convertTime(i)
				}))
			},
			_onProgress: function(t, e) {
				t.widget.slider && !t.widget.slider.sliding && t.widget.slider.box_slider("progress", e * t.widget.slider.maxValue)
			},
			_onState: function(t, e) {
				if(t.widget.playBtn) {
					var i = this.playctrl.player;
					playing = e === i.STATES.PLAY || e === i.STATES.PREBUFFER || e === i.STATES.BUFFERING, playing ? t.widget.playBtn.removeClass("stop") : t.widget.playBtn.addClass("stop")
				}
			}
		}
	}(window), _.Module.define({
		path: "tbui/widget/music_player",
		sub: {
			initial: function(t, e) {
				window.playctrl || (window.playctrl = new window.mbox.PlayCtrl), this.api = window.playctrl.exportAPI(), this.log = window.playctrl.log, this.controller = new window.mbox.Controller(window.playctrl), this.logList = {
					"song-name a": "song_title",
					"artist-name a": "artist_name",
					"album-name a": "album_name",
					logo: "logo",
					"lrc-btn": "lrc",
					"download-btn": "download",
					"go-to-listen-btn": "to_musicbox"
				}, this.ui = [];
				for(var i = 0; i < t.length; i++) this.mboxInit(e[i], t[i], i);
				this.eventInit()
			},
			mboxInit: function(t, e, i) {
				var n = this.ui,
					s = this.logList,
					a = this.log,
					r = this.api,
					o = this.controller;
				if(n[i] = new window.mbox.UiCtrl($(t)), "object" != typeof e) {
					var u = window.mbox.SongDataModel.createSongModel(e);
					window.mbox.SongDataModel.fetchSong(u[0], {
						success: function(e) {
							n[i].tplToHtml(e, t, s, a), n[i].setShowLink(e, t)
						}
					})
				} else 1 != e.hasLink && (e = {
					hasLink: !0,
					songId: e.song_id,
					songName: e.title,
					artistId: e.ting_uid,
					artistName: e.author,
					albumId: e.album_id,
					albumName: e.album_title,
					songPicBig: e.pic_big,
					songPicSmall: e.pic_small,
					songPicRadio: e.pic_radio,
					resourceType: e.resource_type,
					relateStatus: e.relate_status,
					copyType: e.copy_type,
					lrcLink: e.lrclink,
					rate: e.file_bitrate,
					songLink: e.file_link,
					showLink: e.show_link,
					format: e.file_extension,
					size: e.file_size,
					time: e.file_duration
				}), n[i].tplToHtml(e, t, s, a), n[i].setShowLink(e, t);
				r.addSong(e), $(t).find(".ctrl-btn").click(function() {
					function e(t) {
						return function() {
							o.bindUi(n[t], !0), r.setPlayIndex(t, !0)
						}
					}
					if($(t).find(".mbox-time").addClass("red_text"), !n[i].$root.hasClass("active")) {
						window.playctrl.player.stop();
						var s = e(i);
						setTimeout(s, 100)
					}
				})
			},
			eventInit: function() {
				$(document).delegate(".add-favour", "click", function() {
					var t = this,
						e = $(this).parents(".right-top").find($(".song-name")).tbattr("songid"),
						i = "https://gss2.baidu.com/6Ls1aze90MgYm2Gp8IqW0jdnxx1xbK/v1/restserver/ting?method=baidu.ting.favorite.addSongFavorite&from=tieba";
					$.getJSON(i + "&callback=?", {
						songId: e
					}, function(e) {
						var i = e.error_code;
						22e3 === i || 22322 === i ? $(t).addClass("add-favour-red") : 22452 === i && _.Module.use("common/widget/LoginDialog", ["", ""])
					})
				}).delegate(".lrc-btn", "click", function() {
					var t = $(this).parents(".right-top").find($(".song-name")).tbattr("songid");
					window.open("http://music.baidu.com/song/" + t + "#song_lyric")
				}).delegate(".download-btn", "click", function() {
					var t = $(this).parents(".right-top").find($(".song-name")).tbattr("songid");
					window.open("http://music.baidu.com/song/" + t + "/download")
				}).delegate(".go-to-listen-btn", "click", function() {
					var t = $(this).parents(".right-top").find($(".song-name")).tbattr("songid");
					window.open("http://music.baidu.com//box?&&__methodName=mboxCtrl.playSong&__argsValue=" + t)
				})
			}
		}
	});
_.Module.define({
	path: "frs-list/widget/util_picture_slide",
	sub: {
		_windowWidth: 0,
		_jq_picsWrap: null,
		_jq_pics: null,
		_speed: "fast",
		_easing: "swing",
		initial: function(i) {
			this._windowWidth = i.windowWidth, this._jq_pics = i.jq_pics, this._jq_picsWrap = i.jq_picsWrap, this._speed = i.speed || this._speed, this._easing = i.easing || this._easing
		},
		slideNext: function() {
			for(var i = this._jq_picsWrap.position(), s = i.left, t = -s + this._windowWidth, _ = 0, e = 0, h = !1, p = this._jq_pics.size(), n = 0; p > n; n++) {
				var d = $(this._jq_pics.get(n)),
					a = d.position(),
					r = a.left,
					o = d.width(),
					c = r + o;
				if(c > t) {
					_ = n, e = r;
					break
				}
			}
			this._windowWidth + e > this._jq_picsWrap.width() && (e = this._jq_picsWrap.width() - this._windowWidth, h = !0), e > 0 && (this._jq_picsWrap.animate({
				left: -e + "px"
			}, this._speend, this._easing), h && this.trigger("lastend"))
		},
		slidePrev: function() {
			for(var i = this._jq_picsWrap.position(), s = i.left, t = -s, _ = 0, e = -1, h = !1, p = this._jq_pics.size(), n = 0; p > n; n++) {
				var d = $(this._jq_pics.get(n)),
					a = d.position(),
					r = d.width(),
					o = a.left,
					c = o + r;
				if(o >= t) {
					t = c - this._windowWidth, 0 > t && (t = 0), _ = n;
					break
				}
			}
			for(var n = _; n >= 0; n--) {
				var d = $(this._jq_pics.get(n)),
					a = d.position(),
					r = d.width(),
					o = a.left,
					c = o + r;
				if(t >= o || 0 == n) {
					_ = n, e = o;
					break
				}
			}
			h = 0 == e, e >= 0 && (this._jq_picsWrap.animate({
				left: -e + "px"
			}, this._speed, this._easing), h && this.trigger("firstend"))
		}
	}
});
_.Module.define({
	path: "frs-list/widget/util_media_init",
	requires: ["frs-list/widget/util_picture_slide"],
	sub: {
		_jq_wrap: null,
		_jq_innerWrap: null,
		_jq_mediaListWrap: null,
		_slidingWindow: null,
		_jq_prevBtn: null,
		_jq_nextBtn: null,
		_options: {},
		initial: function() {},
		init: function(i, t) {
			this._jq_wrap = i, this._jq_innerWrap = i.find(".j_small_list"), this._jq_prevBtn = i.find(".j_small_pic_pre"), this._jq_nextBtn = i.find(".j_small_pic_next"), this._jq_mediaListWrap = i.find(".j_threadlist_media"), null != t && (this._options = $.extend(this._options, t)), this._slidingWindow = this.requireInstance("frs-list/widget/util_picture_slide", [{
				windowWidth: this._jq_innerWrap.width(),
				jq_pics: this._jq_mediaListWrap.find("li"),
				jq_picsWrap: this._jq_mediaListWrap
			}]), this._initBtn(), this._bindEvents()
		},
		_initBtn: function() {
			var i = this,
				t = this._jq_wrap.width();
			this._jq_mediaListWrap.css("float", "left");
			setTimeout(function() {
				i._jq_mediaListWrap.find(".j_m_pic").load(function() {
					i._showBtn(t)
				}), i._showBtn(t)
			}, 500)
		},
		_showBtn: function(i) {
			!this._jq_nextBtn.showed && this._jq_mediaListWrap.width() - 10 > i && (this._jq_nextBtn.show(), this._jq_nextBtn.showed = !0)
		},
		_nonShowBtn: function() {
			this._jq_prevBtn.hide(), this._jq_nextBtn.hide()
		},
		_bindEvents: function() {
			var i = this;
			this._jq_prevBtn.click(function() {
				i._slidingWindow.slidePrev(), i._jq_nextBtn.show()
			}), i._jq_nextBtn.click(function() {
				i._slidingWindow.slideNext(), i._jq_prevBtn.show()
			}), this._slidingWindow.bind("firstend", function() {
				i._jq_prevBtn.hide()
			}), this._slidingWindow.bind("lastend", function() {
				i._jq_nextBtn.hide()
			})
		}
	}
});
_.Module.define({
	path: "frs-list/widget/util_favorite",
	sub: {
		defaultConf: {
			appid: "314406",
			uploadUrl: "http://up.xiangce.baidu.com/",
			userId: 0,
			cacheEnabled: !0
		},
		defaultData: {
			imgUrl: "",
			sourceURL: "",
			tags: "",
			descript: ""
		},
		conf: {},
		data: {},
		cache: {},
		initial: function() {
			this.conf = $.extend(this.conf, this.defaultConf), this.data = $.extend(this.data, this.defaultData)
		},
		setConf: function(t) {
			this.conf = $.extend(this.conf, t)
		},
		setData: function(t) {
			this.data = $.extend(this.data, t)
		},
		getConf: function() {
			return this.conf
		},
		getData: function() {
			return this.data
		},
		checkStatus: function(t) {
			t && this.setData(t);
			var e = this,
				a = this.conf;
			if(t = this.data, a.cacheEnabled) {
				if(1 === this.checkCache(t.imgUrl)) return e.trigger("check_status_success", "hit_cache"), void 0;
				if(0 === this.checkCache(t.imgUrl)) return e.trigger("check_status_success", "hit_cache_notfav"), void 0
			}
		},
		addToFav: function(t) {
			t && this.setData(t);
			var e = this,
				a = this.conf;
			t = this.data;
			var c = a.uploadUrl + "opencom/picture/fav/upload?app_id=" + a.appid + "&descript=" + encodeURIComponent(t.descript) + "&uid=" + a.userId + "&source_url=" + encodeURIComponent(t.sourceURL) + "&tags=" + encodeURIComponent(t.tags) + "&url=" + encodeURIComponent(t.imgUrl) + "&callback=?";
			$.getJSON(c, function(c) {
				if(a.cacheEnabled) {
					var i = 0 === parseInt(c.errno, 10);
					e.setCache(t.imgUrl, i)
				}
				e.trigger("add_to_fav_success", c)
			})
		},
		setCache: function(t, e) {
			this.cache[t] = e ? 1 : 0
		},
		checkCache: function(t) {
			return this.cache[t]
		}
	}
});
_.Module.define({
	path: "frs-list/widget/util_picture_rotation",
	sub: {
		_cache: {
			obj: null,
			rad: 0
		},
		initial: function() {},
		rotationSimple: function(t, i, r) {
			if(t.width && t.height) {
				var e = 1 * ($(t).tbattr("rad") || 0),
					o = 1;
				e += "right" == i ? 90 : -90, Math.abs(e) % 180 != 0 && t.height > r && (o = r / t.height), this._rotation(t, e, o), $(t).tbattr("rad", e)
			}
		},
		_rotation: function(t, i, r) {
			t.width && t.height && (this._checkCSS3("transform") ? this._rotationForCSS3(t, i, r) : this._rotationForIE(t, i, r))
		},
		_rotationForIE: function(t, i, r) {
			var r = r || 1;
			if($.browser.version < 8) {
				var e = this._getMatrix(i * Math.PI / 180, r);
				t.style.filter = "progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand')", $.extend(t.filters.item("DXImageTransform.Microsoft.Matrix"), e)
			}
			if($.browser.version >= 8) {
				var o = $(t).parent(),
					e = this._getMatrix(i * Math.PI / 180, r);
				if(t.style.filter = "progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand')", i % 180 != 0) {
					{
						var a = t.width * r;
						t.height * r
					}
					$(t).css("visibility", "hidden"), $.extend(t.filters.item("DXImageTransform.Microsoft.Matrix"), e), o.height(a), o.css("position", "relative"), $(t).css({
						visibility: "",
						display: "block",
						position: "absolute",
						left: (o.width() - t.height * r) / 2
					})
				} else $.extend(t.filters.item("DXImageTransform.Microsoft.Matrix"), e), o.height(t.height * r), o.css("position", ""), $(t).css({
					display: "",
					position: "",
					left: 0
				})
			}
		},
		_rotationForCSS3: function(t, i, r) {
			var r = r || 1,
				e = 0,
				o = $(t).parent();
			e = i % 180 == 0 ? 0 : -(t.height - t.width * r) / 2, this._css3(t, "transform", "translate(0px, " + e + "px) rotate(" + i + "deg) scale(" + r + ", " + r + ")"), i % 180 != 0 ? $(o).height(t.width * r) : $(o).height(t.height * r)
		},
		_css3: function(t, i, r) {
			if(!t || !i || "" == i) return !1;
			var e = this._checkCSS3(i);
			return e ? r ? (t.style[e] = r, void 0) : t.style[e] : !1
		},
		_checkCSS3: function(t) {
			for(var i, r = document.body.style, e = t.replace(/^\w/, function(t) {
					return t.toUpperCase()
				}), o = [t, "Moz" + e, "webkit" + e, "O" + e, "ms" + e], a = 0, s = o.length; s > a; a++)
				if(o[a] in r) {
					i = o[a];
					break
				}
			return i ? i : !1
		},
		_getMatrix: function(t, i) {
			var r = Math.cos(t),
				e = Math.sin(t);
			return {
				M11: r * i,
				M12: -e * i,
				M21: e * i,
				M22: r * i
			}
		}
	}
});
_.Module.define({
	path: "frs-list/widget/util_image_process",
	sub: {
		initial: function() {},
		processImage: function(t, e) {
			function i(t, e, i, s, a) {
				var r = 0,
					n = t,
					l = e;
				switch(t > i && (r += 1), e > s && (r += 2), r) {
					case 1:
						n = i, l = e * i / t;
					case 2:
						l = s, n = t * s / e;
					case 3:
						l = e / s > t / i ? s : e * i / t, n = e / s > t / i ? t * s / e : i
				}
				return 0 != r && (a = !0), [n, l, a]
			}

			function s(t, e, s, a, r) {
				var n = e || 120,
					l = s || 120,
					h = !1,
					p = new Image;
				p.src = t.src;
				var c = i(p.width, p.height, n, l, h);
				return t.style.width = c[0] + "px", t.style.height = c[1] + "px", "function" == typeof r && r.apply(this, arguments), t.style.visibility = "visible", 1 == a && (t.style.marginTop = (s - parseInt(c[1])) / 2 + "px"), p = null, c[2]
			}
			var a = 400,
				r = 100;
			r > 100 && e.height > e.width && (a = r, r = 1e5), s(e, a, r);
			var n = e.style.width,
				l = Number(n.replace("px", ""));
			if(50 > l) {
				var h = t.parent();
				h.is("vpic_wrap") && t.parent.addClass("vpic_small")
			}
			t.css({
				width: e.style.width,
				height: e.style.height
			})
		}
	}
});
_.Module.define({
	path: "frs-list/widget/util_media_controller",
	requires: ["frs-list/widget/util_image_process", "frs-list/widget/util_picture_rotation", "frs-list/widget/util_favorite", "frs-list/widget/util_media_init", "tbui/widget/music_player"],
	sub: {
		_jqFav: null,
		_picRotation: null,
		_musicCount: 0,
		_userId: PageData.user.id || 0,
		_forumId: PageData.forum.id,
		_isLogin: PageData.user.is_login || !1,
		_options: {
			bigPicSize: {
				width: 534,
				height: "auto"
			},
			smallPicSize: {
				width: 400,
				height: 90
			}
		},
		initial: function(i) {
			this.$_wrapper = i.wrapper || $(".j_threadlist_bright"), this.containerType = i.type || "threadList", this.render(i), this.lazyloadImage(), this.picRotationInit(), this.picPagerInit(), this.initFav(), this.initPicList()
		},
		lazyloadImage: function() {
			var i = this.requireInstance("frs-list/widget/util_image_process");
			$(".threadlist_pic").lazyload({
				effect: "fadeIn",
				effect_speed: 300,
				process: i.processImage
			})
		},
		render: function(i) {
			var t = this;
			this.$_wrapper.on("click", ".j_threadlist_media", function(e) {
				function a(i, t) {
					return i ? i.match(new RegExp("(\\s|^)" + t + "(\\s|$)")) : !1
				}
				var r = e.target || e.srcElement,
					s = $.tb.unescapeHTML($(r).tbattr("class")),
					n = $(r).closest(".j_thread_list"),
					o = n.find(".j_threadlist_media");
				t.is_repost = o.hasClass("j_repost_media"), t._picWidth = t.is_repost ? 400 : 534;
				var d = n.getData();
				if(a(s, "j_m_music"));
				else {
					if(a(s, "j_m_pic")) return t.mediaPic(r, d);
					if(a(s, "j_m_pic_light")) return t.mediaPic($(r).prev().get(0), d);
					if(a(s, "vpic_wrap")) return t.mediaPic(r, d);
					if(a(s, "j_m_flash")) return t.mediaFlash(r, d, i)
				}
			}), this.$_wrapper.on("click", ".j_retract", function(i) {
				i.preventDefault(), t.closeMedia(this)
			}), $("#thread_pic").on("click", ".j_retract", function(i) {
				i.preventDefault(), t.closeMedia(this)
			});
			var e = null,
				a = null,
				r = $('<video width="240" height="135" class="video_auto" autoplay muted></video>'),
				s = function(i, e) {
					return function(a) {
						var r = a.target;
						r.play(), t._sendLog(i, e, 1)
					}
				};
			if(!$.browser.msie && document.createElement("video").canPlayType) {
				if(window.localStorage) {
					void 0 === window.localStorage.videoOpenAutoPlay && i.videoAutoPlay && (window.localStorage.videoOpenAutoPlay = 1);
					var n = "";
					1 === parseInt(window.localStorage.videoOpenAutoPlay, 10) && (n = "checked"), $("body").on("click", ".j_media_config", function() {
						if(i.videoAutoPlay) {
							var t = ["<p>\u8bbe\u7f6e\u662f\u5426\u5728\u8d34\u5427\u5e16\u5b50\u9875\u81ea\u52a8\u64ad\u653e\u89c6\u9891</p>", '<p><input type="checkbox" name="videoSetting" id="videoSetting" ', n, '/><label for="videoSetting">\u5f00\u542f\u81ea\u52a8\u64ad\u653e</label></p>'];
							$.dialog.confirm(t.join(""), {
								title: "\u64ad\u653e\u8bbe\u7f6e",
								onaccept: function() {
									var i = $("#videoSetting");
									window.localStorage.videoOpenAutoPlay = i.is(":checked") ? 1 : 0, window.location.reload()
								}
							})
						}
					})
				}
				if(window.localStorage && 1 === parseInt(window.localStorage.videoOpenAutoPlay, 10) && i.videoAutoPlay) {
					var o = $('<div class="loading"></div>');
					setInterval(function() {
						var i = $(document).scrollTop(),
							n = $(".threadlist_video");
						$.each(n, function() {
							var n = $(this);
							if("movideo" !== n.find("a").data("type")) return !0;
							var d = n.offset().top;
							if(d - i > 200 && 375 > d - i) {
								var c = $.tb.unescapeHTML(n.find("a").data("video"));
								if(n.find("img").css({
										opacity: 0
									}), n.find("a").css({
										opacity: 0
									}), c !== e) {
									r.remove(), r = $('<video width="240" height="135" class="video_auto" autoplay muted></video>'), r.attr("src", c), n.append(r), n.append(o), $(".video_auto")[0].volume = "0.0", r.on("canplay", function() {
										o.remove()
									});
									var l = c.split("_")[1],
										_ = n.find("a").data("threadid"),
										p = "1" === n.find("a").tbattr("data-isfive") ? !0 : !1,
										h = n.find("a").tbattr("data-forumid");
									r.on("ended", s(_, l)), p ? t._sendFiveLog(_, l, 1, h) : t._sendLog(_, l, 1), e = c, a ? (a.find("img").css({
										opacity: 1
									}), a.find("a").css({
										opacity: 1
									}), a = n) : a = n
								}
								return !1
							}
						})
					}, 1e3)
				}
			}
		},
		mediaPic: function(i, t) {
			var e = this,
				a = !0,
				r = i.className;
			$(i).closest(".threadlist_text").find(".threadlist_media_num").hide(), i = -1 != r.indexOf("vpic_wrap") ? $(i).find("img")[0] : i;
			var s = $(i).closest("li"),
				n = $(i).closest(".j_thread_list"),
				o = !1;
			if(s.siblings().each(function() {
					var i = $(this);
					0 == i.find(".j_m_pic").length && 0 == i.find("#updata_img_totopic").length && "none" != i.css("display") && 0 == i.find(".j_img_more").length && (a = !1)
				}), 1 == $(i).closest("ul").find("#updata_img_totopic").length) {
				var d = $("#pic_theme_list .j_threadlist_piclist_detail");
				d.hide()
			}
			n.find(".j_m_albumpic").length > 0 && (o = !0);
			var c, l = +new Date;
			if(a) {
				var _ = s.index(),
					p = s.siblings().find("img").length,
					h = [];
				n.find(".j_m_pic").each(function() {
					var i = $(this),
						t = {},
						e = i.tbattr("bpic");
					i.tbattr("src").match("/tb/static-frs/img/v2/picerr.gif") && (e = "//tb2.bdstatic.com/tb/static-frs/img/v2/picerr.gif"), i.hasClass("pic_act_spic") ? (t = i.getData(), t.bpic = e, h.push(t)) : h.push(e)
				});
				for(var u = ['<div class="media_box j_remove j_media_box">', '<div class="media_disp">', '<div class="media_pic_control">', this.mediaPic_renderBigPicControl({
						bigPicSrc: h[_],
						ctrlKey: l
					}), "</div>"].join(""), f = "", m = "big_img_" + l, g = 0; p >= g; g++) {
					var v = ['<div class="media_bigpic j_media_bigPic media_bigpic_hidden">', '<div class="media_bigpic_wrap">', this.renderBigImg(h[g], "", t.id), "</div>", '<div class="media_bigpic_display_pre j_display_pre" cur="' + _ + '" total="' + p + '"></div>', '<div class="media_bigpic_display_next j_display_next" cur="' + _ + '" total="' + p + '"></div>'].join("");
					v += "</div>", f += v
				}
				var b = ["</div>", this.mediaPic_renderBigPicBoxTail({
					curPic: _,
					totalPic: p,
					thread_field: t,
					isGoodAlbum: o
				}), "</div>"].join("");
				c = u + f + b;
				var j = $(c);
				e.addMediaBox(i, j), j.find(".j_media_bigPic img").one("load", function() {
					e.onBigImgLoaded(this), e.setBigImgUrl(this, t)
				}), n.find(".j_media_bigPic:eq(" + _ + ")").removeClass("media_bigpic_hidden").find("img").tbattr("id", m), e.controlPreNextButton(_, p, n), e.checkAndSetImgFav(n.find(".j_favImg")), setTimeout(function() {
					e.autoScroll(n, 350)
				}, 300)
			} else {
				var w = $(i).tbattr("bpic");
				c = ['<div class="media_box clearfix j_remove j_media_box">', '<div class="media_disp">', '<div class="media_pic_control">', this.mediaPic_renderBigPicControl({
					bigPicSrc: w,
					ctrlKey: l
				}), "</div>", '<div class="media_bigpic j_media_bigPic">', "<div>", this.renderBigImg(w, "big_img_" + l), "</div>", "</div>", "</div>", this.render_enter_pb({
					url: "/p/" + t.id + (!0 === t.is_multi_forum ? "?fid=" + this._forumId : ""),
					isGoodAlbum: o
				}), "</div>"].join("");
				var y = $(c).appendTo(n).find(".j_media_bigPic img").one("load", function() {
					e.onBigImgLoaded(this), e.setBigImgUrl(this, t)
				});
				this.setBigImgUrl(y[0], t)
			}
			return $(i).closest(".j_threadlist_li_right").addClass("hidePre"), !1
		},
		mediaPic_renderBigPicControl: function(i) {
			var t = ['<a rel="noreferrer"  class="j_retract" href="#"><i class="icon_retract"></i>\u6536\u8d77</a>', '<span class="line">|</span>', '<a rel="noreferrer"  target="_blank"  class="j_ypic" href="' + i.bigPicSrc + '"><i class="icon_ypic"></i>\u67e5\u770b\u5927\u56fe</a>', '<span class="line">|</span>', '<a rel="noreferrer"  target="_blank" href="#" class="j_rotation_left" for="big_img_' + i.ctrlKey + '" onclick="return false;" ><i class="icon_turnleft"></i>\u5411\u5de6\u8f6c</a>', '<span class="line">|</span>', '<a rel="noreferrer"  target="_blank" href="#" class="j_rotation_right" for="big_img_' + i.ctrlKey + '" onclick="return false;" ><i class="icon_turnright"></i>\u5411\u53f3\u8f6c</a>'].join("");
			return t
		},
		mediaPic_renderBigPicBoxTail: function(i) {
			var t = "",
				e = this.render_enter_pb({
					url: "/p/" + i.thread_field.id + (!0 === i.thread_field.is_multi_forum ? "?fid=" + this._forumId : ""),
					isGoodAlbum: i.isGoodAlbum
				});
			return t += e
		},
		picRotationInit: function() {
			var i = this;
			this._picRotation = this.requireInstance("frs-list/widget/util_picture_rotation"), this.$_wrapper.on("click", ".j_rotation_left", function(t) {
				i.rotationHandler(this, "left"), t.preventDefault()
			}), this.$_wrapper.on("click", ".j_rotation_right", function(t) {
				i.rotationHandler(this, "right"), t.preventDefault()
			}), this.$_wrapper.on("click", ".j_favImg", function(t) {
				i.favBtnClick(this), t.preventDefault()
			})
		},
		rotationHandler: function(i, t) {
			img = $('.media_bigpic_wrap img');
			img.each(function() {
				if($(this).attr('id') != "")
				{
					$(this).attr('id',$(i).tbattr("for"))
//				console.log($(this))
				}
			})
			var e = this,
				a = $(i).tbattr("for"),
				r = $("#" + a),
				s = r.parent().height();
			e._picRotation.rotationSimple(r[0], t, this._options.bigPicSize.width), r.height() < s && r.parent().height(s)
		},
		favBtnClick: function(i) {
			return i = $(i), i.data("clicking") ? !1 : (i.data("clicking", !0), this._jqFav = i, this._isLogin ? (i.hasClass("done") ? (i.data("clicking", !1), window.open("http://xiangce.baidu.com/opencom/picture/fav/rewrite")) : (this.checkAndSetImgFav(i, !0), this._tbFav.addToFav()), void 0) : (void 0))
		},
		checkAndSetImgFav: function(i, t) {
			if(i.tbattr("data-src")) {
				var e;
				if(this._jqFav = i, t) {
					var a = i.closest(".j_thread_list"),
						r = $.tb.unescapeHTML(a.find('a.j_th_tit,a.th_tit,a[target="_blank"]').tbattr("title"));
					e = {
						sourceURL: $.tb.location.getHref(),
						imgUrl: $.tb.unescapeHTML(i.tbattr("data-src")),
						descript: r
					}
				} else e = {
					imgUrl: $.tb.unescapeHTML(i.tbattr("data-src"))
				};
				this._tbFav.checkStatus(e)
			}
		},
		initFav: function() {
			this._tbFav = this.requireInstance("frs-list/widget/util_favorite");
			var i = {
					userId: this._userId
				},
				t = this;
			this._tbFav.setConf(i);
			var e = {
				tags: "\u767e\u5ea6\u8d34\u5427," + PageData.forum.name + "\u5427"
			};
			this._tbFav.setData(e), this._tbFav.bind("check_status_success", function(i, e) {
				t.favCheckSuccess(e)
			}), this._tbFav.bind("add_to_fav_success", function(i, e) {
				0 == e.errno && e.data && 0 != e.data.status ? t.hasFavImg() : window.alert("\u7f51\u7edc\u5fd9\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5"), t._jqFav.data("clicking", !1)
			})
		},
		favCheckSuccess: function(i) {
			"hit_cache" == i || 0 == i.errno && i.data && 0 != i.data.status ? this.hasFavImg() : this.notFavImg()
		},
		hasFavImg: function() {
			this._jqFav.addClass("done").html("<i class='icon_fav'></i>\u5df2\u6536\u85cf").tbattr("title", "\u67e5\u770b\u5df2\u6536\u85cf\u56fe\u7247")
		},
		notFavImg: function() {
			this._jqFav.removeClass("done").html("<i class='icon_fav'></i>\u6536\u85cf").tbattr("title", "\u6536\u85cf\u5230\u767e\u5ea6\u76f8\u518c")
		},
		picPagerInit: function() {
			var i = this;
			this.$_wrapper.delegate(".j_display_pre", "click", function(t) {
				var e = t.target || t.srcElement;
				return i.picPager(e, -1), !1
			}), this.$_wrapper.delegate(".j_display_next", "click", function(t) {
				var e = t.target || t.srcElement;
				return i.picPager(e, 1), !1
			}), $("#thread_topic").delegate(".j_display_pre", "click", function(t) {
				var e = t.target || t.srcElement;
				return i.picPager(e, -1), !1
			}), $("#thread_pic").delegate(".j_display_pre", "click", function(t) {
				var e = t.target || t.srcElement;
				return i.picPager(e, -1), !1
			}), $("#thread_pic").delegate(".j_display_next", "click", function(t) {
				var e = t.target || t.srcElement;
				return i.picPager(e, 1), !1
			}), $("#thread_topic").delegate(".j_display_next", "click", function(t) {
				var e = t.target || t.srcElement;
				return i.picPager(e, 1), !1
			})
		},
		picPager: function(i, t) {
			var e = this,
				a = new Array,
				r = $(i).closest(".j_thread_list");
			r.find(".j_m_pic").each(function() {
				var i = $(this).tbattr("src").replace(/\/abpic\//, "/pic/");
				a.push(i)
			});
			var s = parseInt($(i).tbattr("cur")),
				n = parseInt($(i).tbattr("total")),
				o = r.find(".j_media_bigPic:eq(" + s + ")"),
				d = o.find("img").tbattr("id");
			o.addClass("media_bigpic_hidden").find("img").tbattr("id", ""), s += t;
			var c = r.getData();
			e.checkAndSetImgFav(r.find(".j_favImg").tbattr("data-src", a[s])), d = "big_img_" + +new Date;
			var l = r.find(".j_media_bigPic:eq(" + s + ")").removeClass("media_bigpic_hidden").find("img").tbattr("id", d);
			this.setBigImgUrl(l[0], c), r.find(".j_display_pre").tbattr("cur", s.toString()), r.find(".j_display_next").tbattr("cur", s.toString()), e.controlPreNextButton(s, n, r)
		},
		controlPreNextButton: function(i, t, e) {
			var a = e.find(".j_display_pre"),
				r = e.find(".j_display_next");
			0 == i ? a.hide() : a.show(), i == t ? r.hide() : r.show()
		},
		initPicList: function() {
			var i = this,
				t = this.requireInstance("frs-list/widget/util_media_init");
			setTimeout(function() {
				i.$_wrapper.find(".j_small_wrap").each(function() {
					"true" != $(this).tbattr("is_handle") && (t.init($(this), null), $(this).tbattr("is_handle", "true"))
				})
			}, 500)
		},
		renderBigImg: function(i, t, e) {
			var a = "";
			if("string" == typeof i && (a = '<img class="j_retract" id="' + t + '" src="' + i + '" onerror="this.src=\'//tb2.bdstatic.com/tb/static-frs/img/v2/picerr.gif\';this.width=82;this.height=75;" />'), "object" == typeof i) {
				var r = {
						activity_id: i.activity_id,
						post_id: i.post_id,
						user_id: i.user_id,
						user_name: i.user_name,
						thread_id: e,
						pic_encode: i.pic_encode,
						thread_title: i.thread_title
					},
					s = ['<img class="j_retract" id="' + t + '" src="#{bpic}" onerror="this.src=\'//tb2.bdstatic.com/tb/static-frs/img/v2/picerr.gif\';this.width=82;this.height=75;"  />', "#{total_join_num}", '<div class="pic_act_vote cnt_act_vote_area j_pic_act_vote_area" ' + $.tb.dataField(r) + ">", '<span class="act_vote_num j_pic_act_vote_num">#{vote_num}</span>\u7968', "</div>", '<p class="pic_act_reason"><span class="pic_act_user">#{user_name}</span>#{content}</p>'].join("");
				i.total_join_num = "" != i.total_join_num ? '<p class="pic_act_meta_warp"><span>\u8fd8\u6709<em class="pic_act_join_work">' + i.total_join_num + '</em>\u5f20\u53c2\u8d5b\u4f5c\u54c1\u54e6</span><a rel="noreferrer"  href="/p/' + e + '" class="pic_act_post_link" target="_blank" title="\u67e5\u770b\u66f4\u591a">\u67e5\u770b\u66f4\u591a</a></p>' : "", i.content && (i.content = "\uff1a" + $.tb.subByte(i.content, 25, "...")), a = $.tb.format(s, i)
			}
			return a
		},
		onBigImgLoaded: function(i) {
			return;
			var t = $(i),
				e = t.closest(".j_thread_list"),
				a = e.find(".j_threadlist_media"),
				r = a.hasClass("j_repost_media");

			r ? this.resizePic_temp(i, this._options.smallPicSize.width, 6e3) : this.resizePic_temp(i, this._options.bigPicSize.width, 6e3);
			var s = t.height();
			if(200 > s) {
				var n = Math.round((200 - s) / 2);
				t.css({
					"margin-top": n + "px",
					"margin-bottom": n + "px"
				})
			}
		},
		loadedDefaultImg: function(i) {
			var t = this,
				e = $(i).tbattr("data-vsrc");
			$(i).one("load", function() {
				t.onBigImgLoaded(i)
			}), i.src = $.tb.unescapeHTML(e)
		},
		getSearch: function(i) {
			return i.replace(/http:\/\/box\.baidu\.com\/widget\/flash\/bdspacesong\.swf\?/g, "")
		},
		getSearchValue: function(i, t) {
			var e = t.replace(/^\?/, ""),
				a = {};
			if(!e) return void 0 === i ? a : void 0;
			e = e.split("&amp;");
			for(var r, s = 0, n = e.length; n > s; s++) r = e[s].indexOf("="), r > 0 ? a[e[s].substring(0, r)] = e[s].substring(r + 1) : a[e[s]] = "";
			return void 0 === i ? a : a[i]
		},
		stopPlayMusic: function() {
			window.playctrl && window.playctrl.player.stop()
		},
		mediaMusic: function(i, t) {
			var e = ['<div dr="J" class="media_box j_remove j_media_box">', '<div class="media_disp">', '<div class="media_pic_control">', '<a rel="noreferrer"  class="j_retract" href="#"><i class="icon_retract"></i>\u6536\u8d77</a>', "</div>", '<div class="j_music_box"></div>', "</div>", this.render_enter_pb({
					url: "/p/" + t.id + (!0 === t.is_multi_forum ? "?fid=" + this._forumId : "")
				}), "</div>"].join(""),
				a = $(e);
			this.addMediaBox(i, a);
			var r = this,
				s = $(i).tbattr("data-video").replace(/autoPlay=false/g, "autoPlay=true"),
				n = a.find(".j_music_box"),
				o = r.getSearch(s),
				d = r.getSearchValue("song_id", o);
			return d ? (r.musicPlayer ? r.musicPlayer.mboxInit(n, d, r._musicCount) : (r.musicPlayer = r.requireInstance("tbui/widget/music_player", [
				[],
				[]
			]), r.musicPlayer.mboxInit(n, d, r._musicCount)), r._musicCount++) : n.html('<embed scale="noborder" allowfullscreen="true" allowscriptaccess="never" src="' + s + '" menu="false" loop="true" play="true" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" class="BDE_Music" height="95" width="400">'), $(i).closest(".j_threadlist_li_right").addClass("hidePre"), $(i).closest(".threadlist_text").find(".threadlist_media_num").hide(), !1
		},
		mediaFlash: function(i, t, e) {
			var a = this,
				r = $(i).tbattr("data-video");
			if(r && /^http:\/\//.test(r) && "https:" === $.tb.location.getProtocol()) return null != $(i).tbattr("data-vsrc") ? window.open($(i).tbattr("data-vsrc")) : window.open(r), void 0;
			var s = $(i).tbattr("data-type"),
				n = 386,
				o = $(i).tbattr("data-threadid"),
				d = "1" === $(i).tbattr("data-isfive") ? !0 : !1,
				c = $(i).tbattr("data-forumid");
			"movideo" === s && (n = this._options.bigPicSize.width);
			var l = "";
			if("movideo" === s && (!$.browser.msie || $.browser.msie && !/^[678]/.test($.browser.version)) && document.createElement("video").canPlayType) {
				var _ = $.tb.unescapeHTML(r),
					p = _,
					h = p.split("_")[1];
				l = '<video style="background:#000"width="' + this._options.bigPicSize.width + '" height="' + n + '" src="' + p + '" data-md5="' + h + '" data-forumid="' + c + '" controls autoplay></video>', d ? this._sendFiveLog(o, h, 2, c) : this._sendLog(o, h, 2)
			} else l = ['<embed scale="noborder" allowfullscreen="true" allowscriptaccess="never" src="', r, '" menu="false" loop="true" play="true" ', ' wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" ', ' type="application/x-shockwave-flash" class="BDE_Flash" width="', this._options.bigPicSize.width, '" height="' + n + '">'].join(""), d ? this._sendFiveLog(o, null, 2, c) : this._sendLog(o, null, 2);
			var u = ['<div dr="H" class="media_box j_remove j_media_box">', '<div class="media_disp j_media_disp">', '<div class="media_pic_control">', '<a rel="noreferrer"  class="j_retract j_retract_media" href="#"><i class="icon_retract"></i>\u6536\u8d77</a>', '<span class="line">|</span>', '<a rel="noreferrer"  class="pop_media j_pop_media" href="#"><i class="icon_pop"></i>\u5f39\u51fa</a>', '<span class="line">|</span>', '<a rel="noreferrer"  class="media_config j_media_config" href="javascript:void(0)">', e.videoAutoPlay ? '<i class="icon_cog"></i>\u8bbe\u7f6e</a>' : "", "</div>", l, "</div>", this.render_enter_pb({
					url: "/p/" + t.id + (!0 === t.is_multi_forum ? "?fid=" + this._forumId : "")
				}), "</div>"].join(""),
				f = $(i).closest(".j_thread_list");
			return a.autoScroll(f, 400, function() {
				a.addMediaBox(i, $(u)), $(i).closest(".j_threadlist_li_right").addClass("hidePre")
			}, 520), $(i).closest(".threadlist_text").find(".threadlist_media_num").hide(), !1
		},
		_sendLog: function(i, t, e) {
			var a = {
				thread_id: i,
				forum_id: PageData.forum.id || PageData.forum.forum_id,
				obj_locate: "frs",
				obj_id: 0,
				tbs: PageData.tbs,
				obj_type: e || 2
			};
			t && (a.video_md5 = t), $.post("/video/playStat", a)
		},
		_sendFiveLog: function(i, t, e, a) {
			var r = {
				thread_id: i,
				forum_id: a,
				obj_locate: "frs_five_insert",
				obj_id: 0,
				tbs: PageData.tbs,
				obj_type: e || 2
			};
			t && (r.video_md5 = t), $.post("/video/playStat", r)
		},
		addMediaBox: function(i, t) {
			var e = this,
				a = $(i).closest(".j_thread_list"),
				r = $(i).closest(".j_threadlist_media"),
				s = r.hasClass("j_repost_media");
			s ? t.appendTo(r.parent()) : t.appendTo(a);
			var n = t.find("video");
			n.on("ended", function(t) {
				var a = t.target,
					r = $($(i)[0]).data("threadid"),
					s = $(a).data("md5");
				a.play(), e._sendLog(r, s, 1)
			})
		},
		render_enter_pb: function(i) {
			var t = ['<div class="j_enter_pb_wrapper enter_pb_wrapper"><a rel="noreferrer"  href="' + i.url + '" class="btn_default btn_small" target="_blank">', i.isGoodAlbum ? "\u8fdb\u5165\u56fe\u518c" : "\u8fdb\u5165\u8d34\u5b50", "</a></div>"].join("");
			return t
		},
		autoScroll: function(i, t, e, a) {
			var r = i.height(),
				s = $(window),
				n = s.scrollTop(),
				o = i.offset(),
				d = o.top,
				c = s.height(),
				l = d + (a ? a : r) - n;
			if(l > c) {
				var _ = d - 5;
				c > r && !e && (_ = d + r - c + 10);
				var p = window.navigator.userAgent.match(/chrome/i),
					h = p ? document.body : document.documentElement;
				e || $(document).bind("mousewheel.scroll", function() {
					$(h).stop(), $(document).unbind("mousewheel.scroll")
				}), $(h).animate({
					scrollTop: _
				}, t, "swing", function() {
					$(document).unbind("mousewheel.scroll"), e && e()
				})
			} else e && e()
		},
		closeMedia: function(i) {
			if(1 == $(i).closest("ul").find("#updata_img_totopic").length) {
				var t = $("#pic_theme_list .j_threadlist_piclist_detail");
				t.show(), $(this).closest("div").css("height", "100px"), $("#pic_turn").css("height", "100px")
			}
			var e = $(i).closest(".j_thread_list");
			e.find(".threadlist_media_num").show();
			var a = e.find(".j_threadlist_li_right").removeClass("hidePre").end().find(".media_box");
			if(a.find(".j_music_box").length > 0 && this.stopPlayMusic(), a.hasClass("j_remove")) {
				var r = this.findTotalOffset(e[0]).top,
					s = $(document).scrollTop();
				s > r && $(document).scrollTop(r), a.remove(), $(i).closest("j_media_box").find(".j_enter_pb_wrapper").remove()
			} else a.hide()
		},
		findTotalOffset: function(i) {
			var t = 0,
				e = 0;
			if(i.offsetParent)
				do t += i.offsetLeft, e += i.offsetTop; while (i = i.offsetParent);
			return {
				left: t,
				top: e
			}
		},
		setOptions: function(i) {
			null != i && (this._options = $.extend(this._options, i), null == i.smallPicSize && (this._options.smallPicSize.height = 90))
		},
		getPhotoPageByUrl: function(i, t) {
			var e = i.src,
				a = e.substring(e.lastIndexOf("/") + 1, e.lastIndexOf("."));
			if(t.is_repost) {
				var r = $(i).closest(".j_frs_repost"),
					s = r.getData();
				return "/photo/p?kw=" + s.fname + "&flux=1&tid=" + s.tid + "&pic_id=" + a + "&pn=1&see_lz=1"
			}
			return "/photo/p?kw=" + PageData.forum.name + "&flux=1&tid=" + t.id + "&pic_id=" + a + "&pn=1&see_lz=1"
		},
		setBigImgUrl: function(i, t) {
			var e = i.src,
				a = i.width,
				r = i.height,
				s = 80,
				n = 80,
				o = $(i).closest(".j_media_box"),
				d = $(i).closest(".media_bigpic"),
				c = o.find(".j_ypic");
			d.hasClass("media_bigpic_hidden") || (a > s && r > n && a * r >= 1e4 ? c.tbattr("href", this.getPhotoPageByUrl(i, t)) : c.tbattr("href", e))
		},
		resizePic_temp: function(i, t, e, a, r) {
			function s(i, t, e, a) {
				var r = 0,
					s = i,
					n = t;
				switch(i > e && (r += 1), t > a && (r += 2), r) {
					case 1:
						s = e, n = t * e / i;
						break;
					case 2:
						n = a, s = i * a / t;
						break;
					case 3:
						n = t / a > i / e ? a : t * e / i, s = t / a > i / e ? i * a / t : e
				}
				return 0 != r && (d = !0), [s, n]
			}
			var n = t || 120,
				o = e || 120,
				d = !1,
				c = $(i);

			c.src = i.src;
			var l = s(c.width(), c.height(), n, o);
			return i.style.width = l[0] + "px", i.style.height = l[1] + "px", "function" == typeof r && r.apply(this, arguments), i.style.visibility = "visible", 1 == a && (i.style.marginTop = (e - parseInt(l[1])) / 2 + "px"), c = null, d
		}
	}
});
_.Module.define({
	path: "frs-list/widget/util_https_stat",
	sub: {
		initial: function() {
			"https:" !== location.protocol && (this._checkResource("https://www.baidu.com/nocache/imgdata/gs.gif", "z_shttps", "z_shttps_count"), Date.now || (Date.now = function() {
				return(new Date).getTime()
			}), this._checkResource("http://tieba.baidu.com/empty.gif?t=" + Date.now(), "z_http", "z_http_count"))
		},
		_checkResource: function(t, e, i) {
			return
			var o = new Image,
				c = -1,
				n = "failure";
			o.onload = function() {
				if(-1 !== c) {
					var t = {};
					t[e] = Date.now() - c, alog("cus.fire", "time", t)
				}
				n = "success"
			}, setTimeout(function() {
				c = Date.now(), o.src = t, setTimeout(function() {
					var t = {};
					t[i] = n, alog("cus.fire", "dis", t)
				}, 2e3)
			}, 1e4)
		}
	}
});
_.Module.define({
	path: "frs-list/widget/scroll_event",
	sub: {
		initial: function() {
			this.isStartListenScroll = !1, this.initListenFunction(), this.initARAttribute(), this.initScrollEvent(), this.startListenARScroll()
		},
		initListenFunction: function() {
			var t = this,
				i = 7;
			t.startListenARScroll = function() {
				var e = t.levels,
					o = $(window).scrollTop() + $(window).height();
				for(var n in e) {
					var s = parseInt(n, 10),
						r = e[s].offsetTop,
						l = (e[s].height, e[s].templateId),
						a = e[s].monitorId,
						p = e[s].isFlaged,
						h = e[s].type || 0;
					if(Number(h) !== i) return e[s].isFlaged = !0, void 0;
					o > r && !p && ($.stats.track("p0271", "tpoint", "FRS", "view", {
						tpointShow: l,
						line: "PT",
						action_type: "VIEW_TRUE",
						obj_id: l,
						obj_name: a,
						obj_cpid: 0,
						obj_good_id: 0,
						obj_throw_type: "BY_POST",
						err_no: 0,
						user_timestamp: Math.round((new Date).getTime() / 1e3),
						pro: "tieba",
						mid: "adtpoint",
						urlkey: "adtpoint",
						log_ver: 1.1
					}), e[s].isFlaged = !0)
				}
			}
		},
		initARAttribute: function() {
			var t = this,
				i = t.getAutoReplys();
			t.isExitAutoReply && (t.levels = i)
		},
		initScrollEvent: function() {
			var t = this,
				i = $(window);
			t.isExitAutoReply && (i.on("scroll", _.throttle(t.startListenARScroll, 250)), t.isStartListenScroll = !0)
		},
		getAutoReplys: function() {
			var t = this,
				i = {},
				e = null;
			return t.isExitAutoReply = !1, $(".j_thread_list").each(function(o) {
				var n = $(this).data("field"),
					s = "",
					r = "",
					l = "";
				if(n && n.frs_tpoint && n.frs_tpoint.is_tpoint && (e = n.frs_tpoint, s = e.monitor_id, l = e.template_id, r = e.tp_type), l || 0 === l) {
					var a = $(this).height(),
						p = $(this).offset().top,
						h = {
							offsetTop: p,
							height: a,
							isFlaged: !1,
							templateId: l,
							monitorId: s,
							type: r
						};
					i[o] = h, t.isExitAutoReply = !0
				}
			}), i
		},
		getHalfScreenHeight: function() {
			return $(window).height() / 2
		}
	}
});
_.Module.define({
	path: "entertainment-game/widget/game_code_thread",
	sub: {
		initial: function(t) {
			this.$wrapper = t && t.wrapper || $(".j_threadlist_bright"), this._bindGameEvents()
		},
		_bindGameEvents: function() {
			this._addGameTrack()
		},
		_addGameTrack: function() {
			this.$wrapper.on("click", ".j_game_code_thread", function() {
				var t = $(this),
					a = t.tbattr("data-code_id"),
					e = t.tbattr("data-pkg_name"),
					_ = "frs\u8d34\u5b50\u5185\u5bb9\u70b9\u51fb",
					i = "3000702",
					d = "mobile_game_test",
					n = "click",
					r = {
						event_client_type: "pc_web",
						da_task: d,
						da_type: n,
						da_locate: i,
						da_obj_name: e,
						da_obj_id: a,
						da_obj_position: _
					};
				$.stats.track(i, d, "", n, r)
			})
		}
	}
});
_.Module.define({
	path: "entertainment-game/widget/game_thread",
	sub: {
		initial: function(t) {
			this.$wrapper = t && t.wrapper || $(".j_threadlist_bright"), this._bindGameEvents()
		},
		_bindGameEvents: function() {
			this._bindGameImgViewer(), this._bindGameDescViewer(), this._addGameTrack(), this._addGameDownloadEvent()
		},
		_addGameTrack: function() {
			this.$wrapper.on("click", ".mobile_game_gift_link", function() {
				var t = $(this),
					a = t.tbattr("href");
				$.stats.track("\u793c\u5305", "\u6e38\u620f\u5427\u6e38\u620f\u8d34", "frs", "click", {
					obj_link: a
				})
			}), this.$wrapper.on("click", ".j_game_thread_play_outer", function() {
				var t = $(this),
					a = t.data("game_id");
				$.stats.track("\u5f00\u59cb\u6e38\u620f", "\u6e38\u620f\u5427\u6e38\u620f\u8d34", "frs", "click", {
					obj_game_id: a
				})
			})
		},
		_bindGameImgViewer: function() {},
		_addGameDownloadEvent: function() {
			$(".j_game_thread_download").on("click", ".j_game_thread_download_btn", function() {
				var t = $(this).closest(".j_game_thread_download_outer"),
					a = t.data("game_id"),
					e = t.data("game_name"),
					n = $(this).closest(".j_thread_list").index() + 1;
				this.$wrapper.find("thread_top_list_folder").length > 0 && n--, 10 > n && (n = "0" + n), $.stats.track("p10" + n, "mg_pioneerba", "frs", "download", {
					obj_id: a,
					obj_name: e,
					obj_ref: 3000602
				})
			}), $(".j_game_thread_download").on("mouseenter", ".j_game_thread_download_btn", function() {
				var t = $(this),
					a = t.tbattr("href"),
					e = t.tbattr("data-to-detail"),
					n = t.next(),
					d = n.find(".j_game_thread_download_qrcode_img");
				"-1" != e && (d.html(""), new window.QRCode(d[0], {
					text: a,
					width: 80,
					height: 80
				}), n.show())
			}), $(".j_game_thread_download").on("mouseleave", ".j_game_thread_download_btn", function() {
				var t = $(this),
					a = t.next();
				a.hide()
			})
		},
		_bindGameDescViewer: function() {
			$(".game_thread_detail_main").on("click", ".j_text_more", function() {
				var t = $(this),
					a = t.data("show"),
					e = "";
				"text_detail" == a ? (e = t.getData().text_cutoff, t.html('[\u8be6\u7ec6\u4ecb\u7ecd<span class="slide_btn downward"></span>]'), t.data("show", "text_cutoff")) : a && "text_cutoff" != a || (e = t.getData().text_detail, t.html('[\u6536\u8d77\u4ecb\u7ecd<span class="slide_btn upward"></span>]'), t.data("show", "text_detail")), t.siblings(".j_text_show").html(e)
			})
		}
	}
});
_.Module.define({
	path: "tbui/widget/card",
	requires: [],
	sub: {
		_option: {},
		_j_card: null,
		_open_timer: null,
		_close_timer: null,
		_is_show: !1,
		_is_first_show: !0,
		_default_option: {
			content: "",
			arrow_dir: "down",
			arrow_pos: {},
			card_css: {
				width: 170,
				"z-index": 1001
			},
			arrow_req: !0,
			auto_positon: !1,
			event_target: null,
			offset: {
				x: 0,
				y: 0
			},
			card_leave_display: !1,
			card_hover_show: !0,
			card_leave_hide: !1,
			attr: "",
			clazz: "",
			wrap: $("body")
		},
		initial: function(t) {
			var i = this;
			i._option = $.extend(!0, {}, i._default_option, t), this._buildCard()
		},
		_buildCard: function() {
			var t = this._option,
				i = this._genericTpl(),
				e = t.wrap;
			this._j_card = $(i), this._j_card.find(".j_content").html(t.content), e.append(this._j_card), delete t.card_css.height, this._j_card.css(t.card_css), t.card_css.height = this._j_card.find(".j_content").outerHeight(!0), this._arrow = this._j_card.find(".j_ui_white_arrow"), void 0 === t.arrow_pos.left && (this._arrow_left = t.card_css.width / 2 - 10, this._arrow.css({
				left: this._arrow_left
			})), this._arrow.css(t.arrow_pos), t.arrow_req || this._j_card.find(".j_ui_white_arrow").hide(), t.auto_positon && this._autoPosition()
		},
		_autoPosition: function() {
			var t = this._option,
				i = {},
				e = $(window).height(),
				_ = $(window).width(),
				o = ($(document).scrollLeft(), $(document).scrollTop()),
				r = (t.event_target.innerWidth(), t.event_target.innerHeight()),
				s = "",
				a = {
					x: t.event_target.offset().left - t.card_css.width / 2 + t.event_target.outerWidth(!0) / 2,
					y: t.event_target.offset().top - t.card_css.height - 10,
					width: this._j_card.innerWidth(),
					height: this._j_card.innerHeight() + this._arrow.innerHeight()
				};
			i.left = a.x, i.top = a.y;
			var n = t.arrow_pos.left || this._arrow_left,
				d = 15,
				h = _;
			_ < $(document).width() && (h = $(document).width());
			var c = h - (t.card_css.width + d);
			i.left < d ? (n += i.left - d, i.left = d) : i.left > c && (n += i.left - c, i.left = c), i.top < o ? (s = "up", i.top += r + (a.height || 0), i.top -= t.offset.y) : (i.top += i.top + r > o + e ? -r - (a.height || 0) : 0, s = "down", i.top += t.offset.y), this._arrow.removeClass("ui_white_down").removeClass("ui_white_up").addClass("ui_white_" + s).css({
				left: n
			}), this._j_card.css(i)
		},
		_genericTpl: function() {
			var t = this._option.attr,
				i = this._option.arrow_dir,
				e = this._option.clazz,
				_ = ['<div class="ui_card_wrap ' + e + '" ' + t + ' style="visibility: hidden">', '<div class="j_content ui_card_content ">', "</div>", '<span class="j_ui_white_arrow arrow ui_white_' + i + '"></span>', "</div>"].join("");
			return _
		},
		showCard: function(t) {
			var i = this;
			i._close_timer && clearTimeout(i._close_timer), t && "delayShow" == t.type ? (i._open_timer && clearTimeout(i._open_timer), i._open_timer = setTimeout(function() {
				i._showCardDo()
			}, t.time)) : i._showCardDo()
		},
		closeCard: function(t) {
			var i = this;
			i._open_timer && clearTimeout(i._open_timer), t && "delayClose" == t.type ? i._close_timer = setTimeout(function() {
				i._closeCardDo()
			}, t.time) : i._closeCardDo()
		},
		hideCard: function(t) {
			var i = this;
			i._open_timer && clearTimeout(i._open_timer), t && "delayHide" == t.type ? i._close_timer = setTimeout(function() {
				i._hideCardDo()
			}, t.time) : i._hideCardDo()
		},
		_showCardDo: function() {
			var t = this;
			t._is_first_show && (this._j_card.bind("mouseenter", function() {
				t._option.card_hover_show && (t._is_show = !0)
			}), this._j_card.bind("mouseleave", function() {
				return t._option.card_leave_display ? !1 : (t._is_show = !1, t._option.card_leave_hide ? t.hideCard() : t.closeCard(), void 0)
			}), t._is_first_show = !1), this._j_card.css({
				visibility: "visible"
			})
		},
		_closeCardDo: function() {
			var t = this;
			this._j_card && !this._is_show && t._j_card.remove()
		},
		_hideCardDo: function() {
			var t = this;
			this._j_card && !this._is_show && t._j_card.css({
				visibility: "hidden"
			})
		},
		setContent: function(t) {
			var i = this._option;
			if(null !== this._j_card) {
				var e = this._j_card.find(".j_content");
				e.html(t), i.card_css.height = e.outerHeight(!0), this._j_card.css({
					height: i.card_css.height
				}), i.auto_positon && this._autoPosition()
			}
		}
	}
});
_.Module.define({
	path: "user/widget/single_icons",
	requires: ["tbui/widget/card"],
	sub: {
		_card: null,
		initial: function(t) {
			this._wrap = t.wrapper || $("body"), this._bindEvents()
		},
		_bindEvents: function() {
			var t = this;
			t._wrap.on("mouseenter", ".j_singleforum_show", function(e) {
				e.currentTarget === this && t._buildCard(this)
			}).on("mouseleave", ".j_singleforum_show", function() {
				return t._card && t._card.closeCard(), t._card = null, !1
			})
		},
		_buildCard: function(t) {
			var e = $(t),
				i = e.getData(),
				r = this;
			i && $.post("/icon/getForumNameByForumId", {
				forum_id: i.forum_id,
				tbs: PageData.tbs,
				ie: "utf-8"
			}).success(function(t) {
				0 == t.no && r._buildPop(e, t.data)
			})
		},
		_getAllForumName: function(t) {
			var e = [];
			for(var i in t) t.hasOwnProperty(i) && e.push(t[i].forum_name);
			return e.join(",")
		},
		_buildPop: function(t, e) {
			var i = this,
				r = i._getAllForumName(e),
				n = "\u53ea\u5728" + r + "\u5427\u5c55\u793a",
				o = t.offset().left - 50 + t.width() / 2,
				a = t.offset().top - 18 - 12;
			this._card = this.requireInstance("tbui/widget/card", [{
				content: n,
				card_css: {
					top: a,
					left: o,
					width: 100
				},
				clazz: "single_icon_class",
				auto_positon: !1,
				event_target: t,
				wrap: $("body")
			}]), this._card.showCard({
				type: "delayShow",
				time: 200
			})
		}
	}
});
_.Module.define({
	path: "encourage-payment/widget/tdou_view_pay",
	requires: ["encourage-payment/widget/tdou_builder", "encourage-payment/widget/tdou_data", "encourage-payment/widget/tdou_view_util", "encourage-payment/widget/tdou_view_auto_redirect", "encourage-payment/widget/tdou_view_operation_bootstrap", "encourage-payment/widget/payMember", "encourage-payment/widget/tdou_view"],
	sub: {
		errors: {
			110000: "\u7528\u6237\u672a\u767b\u9646",
			2320007: "\u7cfb\u7edf\u9519\u8bef\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5",
			210009: "\u7cfb\u7edf\u9519\u8bef\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5",
			2270044: "\u8d26\u53f7\u5f02\u5e38\uff0c\u8bf7\u91cd\u65b0\u767b\u9646",
			2270047: "\u652f\u4ed8\u5931\u8d25\u2014\u8ba2\u5355\u5931\u6548",
			2270050: "\u8ba2\u5355\u72b6\u6001\u5f02\u5e38",
			2270049: "\u5546\u54c1\u8fc7\u671f\uff0c\u8bf7\u91cd\u65b0\u8d2d\u4e70",
			2270015: "\u5546\u54c1\u4e0d\u53ef\u5151\u6362",
			2270051: "\u7cfb\u7edf\u7ef4\u62a4\u4e2d..."
		},
		order_status: {
			0: "\u652f\u4ed8\u672a\u5b8c\u6210\uff01",
			1: "\u652f\u4ed8\u6210\u529f\uff0c\u5546\u54c1\u5151\u6362\u4e2d\uff01",
			2: "\u5151\u6362\u6210\u529f",
			3: "\u5151\u6362\u5931\u8d25\uff0cT\u8c46\u5df2\u9000\u8fd8",
			4: "\u5151\u6362\u8d85\u65f6\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458"
		},
		tdou_buy_confirm_tag: "tdou_buy_confirm",
		is_iframe: !0,
		initial: function(e, t) {
			t = $.extend({}, t);
			var o = t.scores,
				a = t.level;
			this.builder = this.requireInstance("encourage-payment/widget/tdou_builder"), this.dataProxy = this.requireInstance("encourage-payment/widget/tdou_data", {
				scores: o || 0,
				level: a || 0
			}), this.viewUtil = this.requireInstance("encourage-payment/widget/tdou_view_util"), this.message = e, this.autoDirect = this.requireInstance("encourage-payment/widget/tdou_view_auto_redirect")
		},
		createMain: function(e) {
			var t = this;
			t.notShowSucTips = e.notShowSucTips, t.dataProxy.getPayInfo(e, t.onPayInfo, t)
		},
		onPayInfo: function(e) {
			if(this.sendMessage("pay_info", e), e && 0 === e.no) {
				var t = e.data.goods_info,
					o = e.data.order_info,
					a = e.data.user_info;
				this.pay_info = {}, this.pay_info.goods_info = t, this.pay_info.order_info = o, this.pay_info.user_info = a, this.createUI(t, o, a)
			} else this.handleError(e.no)
		},
		createUI: function(e, t, o) {
			var a = this,
				i = "",
				n = o.Parr_props;
			a.dataProxy.setParrProps(n);
			var r = a.dataProxy.getMemberLevel(),
				d = 2 == r,
				_ = o.Parr_scores,
				u = 0;
			_ && (u = _.scores_money + _.scores_other);
			var s = u >= e.tdou_num,
				c = 0;
			s || (c = e.tdou_num - u);
			var l = e.free_vip_level;
			if(s && (t.cpath.pay_cashier || void 0 == t.cpath.pay_cashier)) return a.pay(!1), void 0;
			if(!s && (t.cpath.gettdou_cashier || void 0 == t.cpath.gettdou_cashier)) return a.getTdou(!1), void 0;
			var f = a.confirmCount();
			return s && f > 0 ? (f -= 1, a.confirmCount(f), a.pay(!1), void 0) : (d && l ? i = a.createUI_memberGetTdou_free(s, e, t, c) : d && !l ? i = a.createUI_memberGetTdou(s, e, t, c) : !d && l ? i = a.createUI_nonMemberGetGoodsOwnedMember(s, e, t, c) : d || l || (i = a.createUI_nonMemberGetTdouOwnedMember(s, e, t, c)), a.renderMain(i), a.initUIData(), a.bindMainUIEvents(), void 0)
		},
		directToCrasher: function(e, t, o) {
			var a = this,
				i = o.Parr_props;
			a.dataProxy.setParrProps(i);
			var n = o.Parr_scores,
				r = 0;
			n && (r = n.scores_money + n.scores_other);
			var d = r >= e.tdou_num,
				_ = 0;
			d || (_ = e.tdou_num - r), d ? a.pay(!1) : a.getTdou(!1)
		},
		initUIData: function() {
			var e = this,
				t = e.confirmCount(),
				o = $(".j_baidu_tb_tdou_pay_info_box .j_tdou_buy_confirm");
			o.length > 0 && (parseInt(t) > 0 ? o.tbattr("checked", !0) : o.tbattr("checked", !1))
		},
		createUI_nonMemberGetGoodsOwnedMember: function(e, t, o, a) {
			t.tdou_pay_from = o.from;
			var i = this.builder.buildPayTdouMain_nonMemberGetGoodsOwnedMember(e, t, o, a);
			return i
		},
		createUI_nonMemberGetTdouOwnedMember: function(e, t, o, a) {
			t.tdou_pay_from = o.from;
			var i = this.builder.buildPayTdouMain_nonMemberGetTdouOwnedMember(e, t, o, a);
			return i
		},
		createUI_memberGetTdou: function(e, t, o, a) {
			t.tdou_pay_from = o.from;
			var i = this.builder.buildPayTdouMain_memberGetTdou(e, t, o, a);
			return i
		},
		createUI_memberGetTdou_free: function(e, t, o, a) {
			t.tdou_pay_from = o.from;
			var i = this.builder.buildPayTdouMain_memberGetTdou_freeGoods(e, t, o, a);
			return i
		},
		renderMain: function(e) {
			if(!($(".baidu_tb_tdou_payment_dialog").length > 0)) {
				var t = {
					modal: !0,
					showTitle: !1,
					fixed: !0,
					width: 610,
					height: 275,
					holderClassName: "baidu_tb_tdou_payment_dialog",
					draggable: !0
				};
				t.html = e, this._dialog = new $.dialog(t), this._dialog.element[0].id = "baidu_tb_tdou_payment_dialog", this._dialog.show(), this.sendMessage("ui:main:create", this._dialog)
			}
		},
		bindMainUIEvents: function() {
			var e = this,
				t = e._dialog.element;
			t.find(".j_tdou_pay_header_close").on("click", function() {
				e.closeMain(), e.sendMessage("closed", "");
				var t = e.requireInstance("encourage-payment/widget/tdou_view_operation_bootstrap"),
					o = {
						actionType: "CLOSE_PAYMENT"
					};
				t.triggerByScene(o, e.pay_info)
			}), t.delegate(".j_tb_tdou_pay_btn", "click", function() {
				e.pay()
			}).delegate(".j_tb_tdou_get_tdou_btn", "click", function() {
				e.getTdou()
			}).delegate(".j_tdou_enable_member", "click", function() {
				var e = $(".j_baidu_tb_tdou_pay_info_box .j_tb_tdou_get_tdou_btn");
				$(this).tbattr("checked") ? (e.html("\u5f00\u901a\u4f1a\u5458\u5e76\u83b7\u53d6T\u8c46"), e.addClass("tdou_pay_btn_135")) : (e.html("\u83b7\u53d6T\u8c46"), e.removeClass("tdou_pay_btn_135"))
			}).delegate(".j_tdou_buy_confirm", "click", function() {
				$(this).tbattr("checked") ? e.confirmCount(30) : e.confirmCount(0)
			}).delegate(".j_tdou_buy_icon", "click", function() {
				e.getIcon()
			}).delegate(".j_tdou_open_super_member_link", "click", function() {
				e.closeMain();
				var t = e.requireInstance("encourage-payment/widget/payMember"),
					o = {
						fr: "tdou_view_pay"
					};
				t.showCashier(o)
			})
		},
		pay: function(e) {
			var t = this,
				o = e;
			"undefined" == typeof e && (o = !0);
			var a = {
				no_ui: o
			};
			t.dataProxy.payGoods(t.onPay, t, a)
		},
		onPay: function(e, t) {
			var o = this;
			t && !t.no_ui ? o.wrap = null : (o.wrap = null, o.closeMain());
			var a = o.dataProxy.getPayInfoCache();
			if(0 === e.no) {
				var i = {
					from: a.order_info.from,
					goods_name: $.tb.subByte(a.goods_info.goods_name, 24, ""),
					order_status: e.data.order_info.status,
					price: a.goods_info.tdou_num
				};
				o.viewUtil.displayPaymentSuccess(o.wrap, i, function() {
					o.closeMain(), o.sendMessage("paid", e)
				}, o, o.notShowSucTips)
			} else o.viewUtil.displayPaymentFailed(o.wrap, $.tb.subByte(a.goods_info.goods_name, 24, ""), function() {
				o.closeMain(), o.sendMessage("paid", e)
			}, o)
		},
		getTdou: function(e) {
			var t = this,
				o = !1,
				a = e;
			"undefined" == typeof e && (a = !0), a ? (o = $(".j_baidu_tb_tdou_pay_info_box .j_tdou_enable_member").tbattr("checked"), this.closeMain()) : o = !1;
			var i = t.dataProxy.getPayInfoCache(),
				n = i.order_info.cpath,
				r = {
					consumption_path: i.order_info.scene_id,
					title: "\u7b2c\u4e09\u65b9\u652f\u4ed8:\u83b7\u53d6T\u8c46",
					need_tdou: 0,
					third_order_id: i.order_info.order_id,
					goods_cost_tdou: i.goods_info.tdou_num
				};
			o ? ($.extend(r, {
				title: "\u7b2c\u4e09\u65b9\u652f\u4ed8:\u5f00\u901a\u8d85\u7ea7\u4f1a\u5458,\u83b7\u53d6T\u8c46",
				pay_type: 7,
				tbs: i.tbs
			}), n && "1" == n.purchase && $.extend(r, {
				title: "\u7b2c\u4e09\u65b9\u652f\u4ed8:\u5f00\u901a\u8d85\u7ea7\u4f1a\u5458,\u83b7\u53d6T\u8c46,\u8d2d\u4e70\u5546\u54c1",
				pay_type: 9,
				tbs: i.tbs
			})) : n && "1" == n.purchase && $.extend(r, {
				title: "\u7b2c\u4e09\u65b9\u652f\u4ed8:\u8d2d\u4e70\u5546\u54c1,\u83b7\u53d6T\u8c46",
				pay_type: 8,
				third_order_id: i.order_info.order_id,
				tbs: i.tbs
			}), t.goCashier(r, a)
		},
		goCashier: function(e, t) {
			var o = this,
				a = {
					consumption_path: e.consumption_path,
					title: e.desc,
					need_tdou: e.current_need_tdou,
					goods_cost_tdou: e.goods_cost_tdou || 0,
					pay_type: e.pay_type || 6,
					tbs: e.tbs,
					order_id: e.third_order_id,
					is_dialog: !t,
					pay_info: o.pay_info
				};
			this.autoDirect.display_type = "third_app", this.autoDirect.third_order_id = e.third_order_id, this.autoDirect.createMain(a)
		},
		getIcon: function() {
			var e = this;
			e.closeMain();
			var t = e.dataProxy.getPayInfoCache();
			e.view = this.requireInstance("encourage-payment/widget/tdou_view"), e.view.bind("after_buy_icon", function(o, a) {
				var i = t.goods_info,
					n = t.order_info,
					r = t.user_info;
				null != a && (r.Parr_scores = a), e.createUI(i, n, r)
			}, e);
			var o = t.order_info.scene_id,
				a = "\u7b2c\u4e09\u65b9\u8d2d\u4e70icon",
				i = t.goods_info.tdou_num;
			e.view.createMain(o, a, i)
		},
		closeMain: function() {
			this._dialog && this._dialog.close(), this.dialog = null
		},
		confirmCount: function() {
			var e = this,
				t = arguments[0],
				o = 0,
				a = new Date,
				i = a.getFullYear() + "" + (a.getMonth() + 1) + a.getDate();
			if("undefined" != typeof t) {
				o = parseInt(t);
				var n = i + "#" + o;
				$.tb.Storage.set(e.tdou_buy_confirm_tag, n)
			} else {
				if(t = $.tb.Storage.get(e.tdou_buy_confirm_tag), null == t) return 0;
				var r = t.split("#");
				o = r && 2 == r.length && r[0] == i ? parseInt(r[1]) : 0
			}
			return o
		},
		sendMessage: function(e, t) {
			var o = this,
				a = null;
			a = "closed" == e ? {
				command: "encourage_dialog_closed",
				data: t
			} : "paid" == e ? {
				command: "encourage_paid",
				data: t
			} : {
				command: e,
				data: t
			}, o.message && o.message(a)
		},
		handleError: function(e) {
			if(e) {
				var t = this,
					o = t.errors[e];
				return 11e4 == e ? (t.viewUtil.OpenLoginDialog(), void 0) : (o ? t.viewUtil.displayPaymentError(o) : t.viewUtil.displayPaymentError("\u672a\u77e5\u9519\u8bef"), void 0)
			}
		}
	}
});
_.Module.define({
	path: "encourage-base/widget/post_marry",
	requires: ["common/widget/Card"],
	sub: {
		URL: {
			postMarryThread: "/marriage/postMarriageThread",
			getGift: "/marriage/gift/getSceneGiftList",
			sendGift: "/marriage/gift/sendGift",
			saveOrder: "/marriage/gift/saveOrder"
		},
		giftData: {},
		sceneId: 2000135,
		initial: function(t) {
			return this.opt = t, this.checkLogin() ? ("poster" === t.type ? this.buildInPoster() : "float" === t.type && this.buildInFloat(), void 0) : !1
		},
		bindEvent: function() {
			var t = this;
			$("body").on("click", "[j-post-marry]", function() {
				t.buildInPoster()
			})
		},
		bindTemplateEvent: function() {
			var t = this,
				a = 5;
			this.$root.find("[j-post-marry-title]").focus(), this.$root.on("click", "[j-post-marry-gift-list-left]", function() {
				var r = t.$root.find(".post-marry-gift-list-wrapper ul");
				if(r.find("li").length <= 6) return !1;
				var i = r.find("li").first();
				i.animate({
					marginLeft: -i.width()
				}, function() {
					i.appendTo(r), i.css({
						marginLeft: a
					})
				})
			}).on("click", "[j-post-marry-gift-list-right]", function() {
				var r = t.$root.find(".post-marry-gift-list-wrapper ul");
				if(r.find("li").length <= 6) return !1;
				var i = r.find("li").last();
				i.css({
					marginLeft: -i.width()
				}), i.prependTo(r);
				var e = r.find("li").first();
				e.animate({
					marginLeft: a
				})
			}).on("click", ".post-marry-gift-item", function() {
				var a = $(this);
				a.hasClass("post-marry-gift-item-active") ? (t.$root.find(".post-marry-gift-list-wrapper ul li").removeClass("post-marry-gift-item-active"), t.giftData.gift_id = null, t.giftData.price = 0) : (t.$root.find(".post-marry-gift-list-wrapper ul li").removeClass("post-marry-gift-item-active"), a.addClass("post-marry-gift-item-active"), t.giftData.gift_id = a.tbattr("data-id"), t.giftData.price = a.tbattr("data-price"))
			}).on("mouseover", ".post-marry-gift-item", function() {
				var a = $(this);
				t.buildGiftTipCard(a)
			}).on("mouseout", ".post-marry-gift-item", function() {
				$(this);
				t._visit_card && t._visit_card.closeCard({
					type: "delayClose",
					time: 100
				}), t._visit_card = null
			}).on("change", "[j-post-marry-oath]", function() {
				var a = $(this),
					r = a.val(),
					i = null == r.match(/[^ -~]/g) ? r.length : r.length + r.match(/[^ -~]/g).length;
				i > 280 ? (a.parent().find("[j-post-marry-value-warning]").text("\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc7140\u4e2a\u6c49\u5b57\uff0c\u73b0\u5728\u662f" + Math.ceil(i / 2) + "\u5b57"), t.oathReady = !1) : r ? (a.parent().find("[j-post-marry-value-warning]").html('<div class="post-marry-checked" ></div>'), t.oathReady = !0) : (a.parent().find("[j-post-marry-value-warning]").text("\u6c42\u5a5a\u8a93\u8a00\u4e0d\u80fd\u4e3a\u7a7a"), t.oathReady = !1)
			}).on("change", "[j-post-marry-title]", function() {
				var a = $(this),
					r = a.val(),
					i = null == r.match(/[^ -~]/g) ? r.length : r.length + r.match(/[^ -~]/g).length;
				i > 280 ? (a.parent().find("[j-post-marry-value-warning]").text("\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc7140\u4e2a\u6c49\u5b57\uff0c\u73b0\u5728\u662f" + Math.ceil(i / 2) + "\u5b57"), t.titleReady = !1) : r ? "\u3010\u6c42\u5a5a\u3011" === r ? (a.parent().find("[j-post-marry-value-warning]").text("\u8bf7\u8865\u5168\u6807\u9898"), t.titleReady = !1) : (a.parent().find("[j-post-marry-value-warning]").html('<div class="post-marry-checked" ></div>'), t.titleReady = !0) : (a.parent().find("[j-post-marry-value-warning]").text("\u6807\u9898\u4e0d\u80fd\u4e3a\u7a7a"), t.titleReady = !1)
			}).on("change", "[j-post-marry-user]", function() {
				var a = $(this),
					r = a.val();
				r ? (a.parent().find("[j-post-marry-value-warning]").html('<div class="post-marry-checked" ></div>'), t.userReady = !0) : (a.parent().find("[j-post-marry-value-warning]").text("\u88ab\u6c42\u5a5a\u4eba\u4e0d\u80fd\u4e3a\u7a7a"), t.userReady = !1)
			}).on("submit", "[j-post-marry-form]", function() {
				var a = $(this);
				if(!t.userReady) return t.showAlert("\u8bf7\u586b\u5199\u6c42\u5a5a\u5bf9\u8c61"), !1;
				if(!t.titleReady) return t.showAlert("\u8bf7\u586b\u5199\u6c42\u5a5a\u6807\u9898"), !1;
				if(!t.oathReady) return t.showAlert("\u8bf7\u586b\u5199\u6c42\u5a5a\u8a93\u8a00"), !1;
				t.giftData.user_name = a.find('[name="post-marry-user"]').val();
				var r = {
					title: a.find('[name="post-marry-title"]').val(),
					content: a.find('[name="post-marry-oath"]').val(),
					forum_name: PageData.forum.forum_name || "\u82f1\u4e09\u5609\u54e5",
					user_name: t.giftData.user_name,
					gift_id: t.giftData.gift_id,
					tbs: PageData.tbs
				};
				return t.giftData.scene_id = t.sceneId, t.showAlert("\u7ed3\u5a5a\u8d34\u53d1\u5e03\u4e2d...  "), $.post(t.URL.postMarryThread, r, function(a) {
					if(a) switch(a.no) {
						case 0:
							t.giftData.gift_id ? (t.giftData.post = a.data, t.genOrder(t.giftData)) : (t.showAlert("\u7ed3\u5a5a\u8d34\u53d1\u5e03\u6210\u529f!  "), setTimeout(function() {
								$.tb.location.reload()
							}, 1e3));
							break;
						case 2670002:
							t.showAlert("\u6765\u665a\u4e00\u6b65\uff0c\u8be5\u7528\u6237\u5df2\u7ecf\u7ed3\u5a5a");
							break;
						case 2672671:
							t.showAlert("\u8be5\u7528\u6237\u6b63\u5728\u7533\u8bf7\u6c42\u5a5a\u4e2d");
							break;
						case 2670006:
							t.showAlert('\u60a8\u8fd8\u6ca1\u6709\u8bbe\u7f6e\u6027\u522b\uff0c\u4e0d\u80fd\u6c42\u5a5a <p style="text-align:center; padding:20px; "><a class="btn-small btn-default" href="http://www.baidu.com/p/setting/profile/basic" target="_blank">\u70b9\u51fb\u8bbe\u7f6e</a><p>');
							break;
						case 2670007:
							t.showAlert("\u6c42\u5a5a\u5bf9\u8c61\u6ca1\u6709\u8bbe\u7f6e\u6027\u522b\u4e0d\u80fd\u6c42\u5a5a");
							break;
						case 2670008:
							t.showAlert("\u5185\u6d4b\u671f\u95f4\uff0c\u53ea\u5141\u8bb8\u5f02\u6027\u7ed3\u5a5a\u54e6~");
							break;
						case 2380009:
							t.showAlert("\u5185\u6d4b\u671f\u95f4\uff0c\u9700\u8981\u7ed3\u5a5a\u53cc\u65b9\uff0c\u81f3\u5c11\u4e00\u65b9\u6709\u59b9\u5b50\u56e2\u5370\u8bb0\u65b9\u53ef\u7ed3\u5a5a");
							break;
						default:
							t.showAlert("\u7ed3\u5a5a\u8d34\u53d1\u5e03\u5931\u8d25! ")
					} else t.showAlert("\u670d\u52a1\u5668\u62bd\u98ce\u4e86! ")
				}), !1
			}).on("click", "[j-post-marry-header-close]", function(a) {
				a.preventDefault(), t.dialog.hide()
			})
		},
		buildGiftTipCard: function(t) {
			var a = this,
				r = parseInt(t.tbattr("data-proportion")),
				i = parseInt(t.tbattr("data-price")),
				e = Math.floor(i * (1 - r / 100));
			if(0 !== e && !isNaN(e)) {
				a._visit_card && (a._visit_card.closeCard(), a._visit_card = null);
				var s = "";
				s = 0 === +a.currency ? '<div class="marry-gift-tip-card-content">\u6536\u793c\u4eba\u53ef\u83b7\u5f97 <i class="icon-tbean"></i><span class="orange-text" >' + e + "</span></div>" : '<div class="marry-gift-tip-card-content">\u6536\u793c\u4eba\u53ef\u83b7\u5f97 <i class="icon-blue"></i><span class="orange-text" >' + e + "</span></div>";
				var o = {
					content: s,
					card_css: {
						width: 200,
						zIndex: 60002
					},
					auto_positon: !0,
					event_target: t,
					attr: "id='marry-gift-tip-card'",
					wrap: $("body")
				};
				a._visit_card = a.requireInstance("common/widget/Card", o), a._visit_card.showCard({
					type: "delayShow",
					time: 200
				})
			}
		},
		loadTemplate: function(t, a) {
			var r = this;
			this.template = '<div id="post-marry" class="post-marry" >     <% if (canClose == 0) { %>     <div class="post-marry-header" >\u6b63\u5f0f\u6c42\u5a5a</div>     <% } %>                <form class="post-marry-form" j-post-marry-form>     <div class="post-marry-wrapper" >                 <div class="post-marry-row post-marry-title" >             <label class="post-marry-label" >\u8d34\u5b50\u6807\u9898:</label>             <input class="post-marry-value" name="post-marry-title" j-post-marry-title required value="\u3010\u6c42\u5a5a\u3011"/>             <div  class="post-marry-value-warning" j-post-marry-value-warning ></div>         </div>         <div class="post-marry-row post-marry-user" >             <label class="post-marry-label" >\u6c42\u5a5a\u4eba:</label>             <input class="post-marry-value" required readonly=true value="<%= user_name %>" />         </div>         <div class="post-marry-row post-marry-propose" >             <label class="post-marry-label" >\u88ab\u6c42\u5a5a\u4eba:</label>             <input class="post-marry-value" name="post-marry-user" j-post-marry-user  value="<%= propose_name %>"  required placeholder="\u53ea\u80fd\u5bf9\u62e5\u6709\u59b9\u7eb8\u5370\u8bb0\u7684\u7528\u6237\u6c42\u5a5a" />             <div  class="post-marry-value-warning" j-post-marry-value-warning ><% if( propose_name) { %><div class="post-marry-checked" ></div> <% } %></div>         </div>         <div class="post-marry-row post-marry-oath" >             <label class="post-marry-label"  >\u6c42\u5a5a\u8a93\u8a00:</label>             <textarea class="post-marry-value" name="post-marry-oath" j-post-marry-oath required  placeholder="\u751c\u871c\u800c\u53c8\u771f\u8bda\u7684\u8a93\u8a00\uff0c\u80fd\u63d0\u9ad8\u6c42\u5a5a\u6210\u529f\u51e0\u7387\uff0c\u4e0d\u8d85\u8fc7140\u4e2a\u5b57\u3002"  ></textarea>             <div  class="post-marry-value-warning" j-post-marry-value-warning ></div>         </div>                  <div class="post-marry-row post-marry-gift" >             <label class="post-marry-label" >\u6c42\u5a5a\u793c\u7269\u9009\u62e9(\u53ef\u9009)</label>             <div class="post-marry-gift-list clearfix">                 <% if (giftList.length > 7 ){ %>                     <div class="post-marry-gift-list-left" j-post-marry-gift-list-left ></div>                 <% } %>                                  <div class="post-marry-gift-list-wrapper clearfix" >                     <ul>                         <% for (var i in giftList) {                              var item = giftList[i];                         %>                              <li class="post-marry-gift-item" data-price="<%=item.price %>" data-proportion="<%=item.proportion %>" data-id="<%=item.gift_id %>" >                                 <div class="post-marry-gift-item-wrapper" >                                     <div  class="post-marry-gift-item-img" >                                         <img src="<%=item.large_thumbnail_url %>" />                                         <% if (item.proportion != 100) { %>                                         <i class="icon-marry-gift-dou"></i>                                         <% } %>                                     </div>                                     <span class="post-marry-gift-worth orange-text"><i class="icon-tbean"></i><%=item.price %></span>                                     <div  class="post-marry-gift-item-check" ></div>                                 </div>                                 <p class="post-marry-gift-item-name" ><%=item.gift_name %></p>                                                              </li>                         <% } %>                                                                      </ul>                 </div>                 <% if (giftList.length > 7 ){ %>                     <div class="post-marry-gift-list-right"  j-post-marry-gift-list-right ></div>                 <% } %>             </div>         </div>       </div>      <button type="submit" class="btn-default btn-small post-marry-btn" >\u5f00\u59cb\u6c42\u5a5a</button>     <% if (canClose) { %>    <!--  <a class="btn-small btn-sub post-marry-header-close" j-post-marry-header-close >\u5173\u95ed</a> -->     <span class="post-marry-tip">( \u60a8\u7684\u7ed3\u5a5a\u8d34\u5c06\u4f1a\u53d1\u5230<a href="/f?ie=utf-8&kw=\u82f1\u4e09\u5609\u54e5&fr=marriage_post" target="_blank" >\u82f1\u4e09\u5609\u54e5\u5427</a> )</span>     <% } %>       </form> </div>';
			var i = [],
				e = {
					scene_id: this.sceneId
				};
			$.get(this.URL.getGift, e, function(e) {
				if(e) switch(e.no) {
					case 0:
						i = e.data.gift_list, r.currency = e.data.currency;
						break;
					default:
						console.log("\u793c\u7269\u83b7\u53d6\u5931\u8d25")
				} else i = [];
				i || (i = []), r.$root = $(_.template(r.template)({
					user_name: PageData.user.name,
					propose_name: r.opt.propose_name || "",
					giftList: i,
					canClose: "poster" === t ? 0 : 1
				})), r.opt.propose_name && (r.userReady = !0), r.bindTemplateEvent(), a()
			})
		},
		showAlert: function(t, a) {
			this.dialog_tip && this.dialog_tip.close(), this.dialog_tip = null, t && (this.dialog_tip = new $.dialog({
				title: a ? a : "\u53d1\u8d34\u63d0\u793a",
				html: '<div style="text-align:center" >' + t + "</div>"
			}))
		},
		checkLogin: function() {
			return;
		},
		genOrder: function(t) {
			var a = this.requireInstance("encourage-payment/widget/tbean_safe_ajax"),
				r = this,
				i = t;
			i.user_name = this.giftData.user_name, i.tbs = PageData.tbs, a.post(this.URL.sendGift, i, function(a) {
				if(0 == a.no && a.data) {
					var i = a.data,
						e = {};
					e.order_id = a.data.order_id, e.thread_id = t.post.thread_id, e.post_id = t.post.post_id, e.gift_from = 1, e.price = r.giftData.price, e.tbs = PageData.tbs, $.post(r.URL.saveOrder, e, function() {
						var t = r.requireInstance("encourage-payment/widget/tdou_view_pay", function(t) {
							t.data && !t.data.no && (r.showAlert("\u793c\u7269\u8d60\u9001\u6210\u529f\uff01", "\u793c\u7269\u8d60\u9001"), setTimeout(function() {
								$.tb.location.reload()
							}, 1e3))
						});
						t.createMain(i)
					})
				} else r.showAlert("\u8ba2\u5355\u51fa\u9519\uff0c\u8bf7\u91cd\u8bd5", "\u793c\u7269\u8d60\u9001"), setTimeout(function() {
					$.tb.location.reload()
				}, 1e3)
			})
		},
		hide: function() {
			this.dialog.hide()
		},
		show: function() {
			this.dialog.show()
		},
		buildInFloat: function() {
			this.dialog && this.dialog.close();
			var t = this;
			this.loadTemplate("float", function() {
				t.dialog = new $.dialog({
					title: "\u53d1\u8868\u7ed3\u5a5a\u8d34",
					html: t.$root,
					width: 709,
					holderClassName: "post-marry-dialog"
				})
			})
		},
		buildInPoster: function() {
			if(this.dialog) this.show();
			else {
				var t = $("#tb_rich_poster .poster_body"),
					a = this;
				this.loadTemplate("poster", function() {
					a.dialog = new $.dialog({
						html: a.$root,
						showTitle: !1,
						showModal: !1,
						modal: !1,
						width: 720,
						showShadow: !1,
						fixed: !1,
						top: t.offset().top,
						left: t.offset().left,
						holderClassName: "post-marry-dialog-poster"
					})
				})
			}
		}
	}
});
_.Module.define({
	path: "user/widget/interaction",
	requires: [],
	sub: {
		initial: function(n) {
			n ? (this.dataObj = n, this._bindEvents()) : this._bindFloatEvents()
		},
		_resetDataObj: function(n) {
			this.dataObj = n
		},
		_follow: function(n, e) {
			var t = this;
			if(!PageData.user.is_login) return this.requireInstance("tbui/widget/login_dialog"), !1;
			if(PageData.user.no_un) return this.requireInstance("tbui/widget/login_dialog"), !1;
			var o = t._addLoading(n, 0);
			$.tb.post("/home/post/follow", {
				un: e.un,
				tbs: e.tbs
			}, function(e) {
				if(e)
					if(0 == e.no) t._clearLoading(n, o, 0);
					else if(1990055 === e.no)
					if(t._clearLoading(n, o, 1), "undefined" == typeof passport || "undefined" == typeof passport.pop.init) {
						var a = "undefined" != typeof Env && Env.server_time ? Env.server_time : (new Date).getTime(),
							i = "https://passport";
						$.JsLoadManager.use([i + ".baidu.com/passApi/js/uni_login_wrapper.js?cdnversion=" + Math.floor(a / 6e4), i + ".baidu.com/passApi/js/wrapper.js?cdnversion=" + Math.floor(a / 6e4)], function() {
							window.realname = passport.pop.init({
								type: "accRealName",
								apiOpt: {
									product: "tb",
									staticPage: "//tieba.baidu.com/tb/static-common/html/pass/v3Jump.html"
								},
								tangram: !0,
								color: "green"
							}), window.realname.show()
						}, !0, "utf-8")
					} else window.realname.show();
				else 1130036 == e.no ? t._showError("\u8be5\u7528\u6237\u4e0d\u5e0c\u671b\u88ab\u4ed6\u4eba\u5173\u6ce8", n, 0) : 2260001 == e.no ? t._showError("\u64cd\u4f5c\u592a\u9891\u7e41\uff0c\u8bf7\u6b47\u6b47\uff01", n, 0) : t._showError("\u5173\u6ce8\u5931\u8d25", n, 0);
				else t._showError("\u5173\u6ce8\u5931\u8d25", n, 0)
			})
		},
		_showError: function(n, e, t) {
			var o = new $.dialog({
				html: '<p style="text-align:center">' + n + "<p>",
				width: 300,
				height: 30
			});
			o.bind("onclose", function() {
				var n = 1 == t ? "btn-sub btn-middle btn_concern_done" : "btn_concern btn-attention btn-middle",
					o = 1 == t ? "\u53d6\u6d88\u5173\u6ce8" : "\u5173\u6ce8";
				e.text(o).removeClass().addClass(n)
			})
		},
		_addLoading: function(n, e) {
			var t = $("<span></span>"),
				o = "",
				a = 0,
				i = [".", "..", "..."],
				r = ["\u5173\u6ce8\u4e2d", "\u53d6\u6d88\u4e2d"],
				s = setInterval(function() {
					o = i[a++ % 3], t.text(o)
				}, 400);
			return n.text(r[e]).append(t), s
		},
		_clearLoading: function(n, e, t) {
			var o = 1 == t ? "btn_concern btn-attention btn-small" : "btn_concern_done btn-sub btn-small",
				a = 1 == t ? "\u5173\u6ce8" : "\u53d6\u6d88\u5173\u6ce8";
			n.text(a).removeClass().addClass(o), clearInterval(e)
		},
		_unfollow: function(n, e) {
			var t = this;
			if(!PageData.user.is_login) return this.requireInstance("tbui/widget/login_dialog"), !1;
			if(PageData.user.no_un) return this.requireInstance("tbui/widget/login_dialog"), !1;
			var o = t._addLoading(n, 1);
			$.tb.post("/home/post/unfollow", {
				un: e.un,
				tbs: e.tbs
			}, function(e) {
				if(e && 0 == e.no) t._clearLoading(n, o, 1);
				else if(1990055 === e.no)
					if(t._clearLoading(n, o, 0), "undefined" == typeof passport || "undefined" == typeof passport.pop.init) {
						var a = "undefined" != typeof Env && Env.server_time ? Env.server_time : (new Date).getTime(),
							i = "https://passport";
						$.JsLoadManager.use([i + ".baidu.com/passApi/js/uni_login_wrapper.js?cdnversion=" + Math.floor(a / 6e4), i + ".baidu.com/passApi/js/wrapper.js?cdnversion=" + Math.floor(a / 6e4)], function() {
							window.realname = passport.pop.init({
								type: "accRealName",
								apiOpt: {
									product: "tb",
									staticPage: "//tieba.baidu.com/tb/static-common/html/pass/v3Jump.html"
								},
								tangram: !0,
								color: "green"
							}), window.realname.show()
						}, !0, "utf-8")
					} else window.realname.show();
				else 2260001 == e.no ? t._showError("\u64cd\u4f5c\u592a\u9891\u7e41\uff0c\u8bf7\u6b47\u6b47\uff01", n, 0) : t._showError("\u53d6\u6d88\u5173\u6ce8\u5931\u8d25", n, 1)
			})
		},
		_bindEvents: function() {
			var n = this;
			$("#userinfo_wrap").delegate(".btn_concern", "click", function() {
				return n._follow($(this), n.dataObj), !1
			}), $("#userinfo_wrap").delegate(".btn_concern_done", "click", function() {
				return n._unfollow($(this), n.dataObj), !1
			})
		},
		_bindFloatEvents: function() {
			var n = this;
			$("body").delegate(".card_headinfo_wrap .btn_concern", "click", function() {
				return n._follow($(this), n.dataObj), !1
			}), $("body").delegate(".card_headinfo_wrap .btn_concern_done", "click", function() {
				return n._unfollow($(this), n.dataObj), !1
			})
		}
	}
});
_.Module.define({
	path: "user/widget/member_api",
	sub: {
		initial: function() {},
		getMemberNameClass: function(e, i) {
			var t = "",
				n = (new Date).getTime();
			return n > 13962816e5 && 1396368e6 > n && 4 != i ? t = " vip_red " : (e && e.level && e.level.end_time > n / 1e3 && (t = " vip_red "), t)
		}
	}
});
_.Module.define({
	path: "user/widget/month_icon",
	sub: {
		iconTitle: {
			201401: "\u6469\u7faf\u5ea7",
			201402: "\u6c34\u74f6\u5ea7",
			201403: "\u53cc\u9c7c\u5ea7",
			201404: "\u767d\u7f8a\u5ea7",
			201405: "\u91d1\u725b\u5ea7",
			201406: "\u53cc\u5b50\u5ea7",
			201407: "\u5de8\u87f9\u5ea7",
			201408: "\u72ee\u5b50\u5ea7",
			201409: "\u5904\u5973\u5ea7",
			201410: "\u5929\u79e4\u5ea7",
			201411: "\u5929\u874e\u5ea7",
			201412: "\u5c04\u624b\u5ea7"
		},
		initial: function() {},
		getMonthIcon: function(n, t) {
			t = t || 1;
			for(var i = '<div class="month_icon_theme_' + t + '">', o = "", e = 201401; 201412 >= e; e++) o = n && n[e] ? " month_icon_" + e : " month_icon_gray_" + e, i += '<a href="/tbmall/monthicon" target="_blank" title="' + this.iconTitle[e] + '" class="' + o + '"></a>';
			return i += "</div>"
		}
	}
});
_.Module.define({
	path: "user/widget/user_head",
	sub: {
		initial: function() {
			this.initOptions()
		},
		initOptions: function() {
			this.options = {
				gif: ["1100001", "1100002", "1100003", "1100013", "1100015", "1100016", "1100017", "1100019", "1100116", "1100133", "1100135"],
				filter: []
			}
		},
		getImgFormat: function(t) {
			var r = "png";
			return -1 != $.inArray(t, this.options.gif) && (r = "gif"), r
		},
		getHeadUrl: function(t) {
			var r = t.mParr_props && t.mParr_props.portrait || "",
				i = "";
			return i = r.end_time > (new Date).getTime() / 1e3 ? r.url : "https:" === document.location.protocol ? "https://gss0.bdstatic.com/6LZ1dD3d1sgCo2Kml5_Y_D3/sys/portrait/item/" + t.portrait : "https://gss0.bdstatic.com/6LZ1dD3d1sgCo2Kml5_Y_D3/sys/portrait/item/" + t.portrait
		},
		getHeadFrameStyle: function(t, r) {
			var i = t.mParr_props && t.mParr_props.avatarframe || "",
				e = "",
				o = null,
				s = {
					hasFrame: !1,
					stylestr: ""
				};
			return i.end_time > (new Date).getTime() / 1e3 && (e = i.props_id, o = ["width:" + r + "px", "height:" + r + "px", "padding:10px", "background:url(/tb/static-common/img/props/" + r + "/" + e + "." + this.getImgFormat(e) + ") no-repeat", "border:none", "left:-6px", "top:-6px"], s = {
				hasFrame: !0,
				stylestr: o.join(";")
			}), s
		}
	}
});
_.Module.define({
	requires: ["tbui/widget/login_dialog"],
	path: "user/widget/user_visit_card/beg_card",
	sub: {
		initial: function(e, a) {
			var i = this;
			e.delegate(".j_begcard", "click", function() {
				return i.begCard($(this), a), !1
			})
		},
		begCard: function(e, a) {
			var i = this;
			this.isLogin() && $.ajax({
				type: "post",
				url: "/home/post/begcard",
				data: {
					un: a,
					tbs: PageData.tbs
				},
				dataType: "json"
			}).success(function(a) {
				0 == a.no ? e.removeClass("j_begcard").removeAttr("href").addClass("btn_forbidden").text("\u5df2\u7533\u8bf7") : $.dialog.alert(i.errorMsg(a.no))
			})
		},
		isLogin: function() {
			return PageData.user.is_login ? PageData.user.no_un ? (this.requireInstance("tbui/widget/login_dialog"), !1) : !0 : (this.requireInstance("tbui/widget/login_dialog"), !1)
		},
		errorMsg: function(e) {
			var a = "";
			switch(e) {
				case 2200001:
					a = "\u4eca\u65e5\u540d\u7247\u6570\u7533\u8bf7\u8d85\u8fc7\u4e0a\u9650";
					break;
				case 2200002:
					a = "\u6682\u65f6\u4e0d\u80fd\u7533\u8bf7\u5bf9\u65b9\u7684\u540d\u7247\uff0c\u7a0d\u540e\u518d\u8bd5";
					break;
				case 2200003:
					a = "\u540d\u7247\u6570\u8fbe\u5230\u4e0a\u9650";
					break;
				case 2200004:
					a = "\u540d\u7247\u5df2\u5b58\u5728";
					break;
				case 2200005:
					a = "\u4e0d\u80fd\u91cd\u590d\u7533\u8bf7\u540d\u7247";
					break;
				case 2200012:
					a = "\u4f60\u5df2\u7ecf\u88ab\u5c01\u7981";
					break;
				default:
					a = "\u672a\u77e5\u9519\u8bef"
			}
			return a
		}
	}
}), _.Module.define({
	requires: ["user/widget/icons", "user/widget/user_head", "user/widget/month_icon", "user/widget/member_api"],
	path: "user/widget/user_visit_card/user_visit_card_base",
	sub: {
		countLen: 0,
		initial: function() {},
		getVisitCardTpl: function(e, a, i) {
			var t = PageData.product || "",
				r = this.requireInstance("user/widget/icons"),
				n = this.requireInstance("user/widget/user_head"),
				s = this.requireInstance("user/widget/month_icon"),
				o = this.requireInstance("user/widget/member_api"),
				_ = n.getHeadFrameStyle(a, "105"),
				c = {
					head_img: "/tb/static-ihome/img/panel_" + a.bg_id + ".jpg",
					concernClass: "0" == a.can_followed ? "btn_concern_done btn-sub" : "btn_concern btn-attention",
					concernText: "0" == a.can_followed ? "\u53d6\u6d88\u5173\u6ce8" : "\u5173\u6ce8",
					un: encodeURIComponent(a.name),
					btn_group: i ? this.getBtnGroup(a) : "",
					frameClass: _.hasFrame ? "card_userinfo_left_frame" : "",
					frameStyle: _.stylestr,
					portrait: n.getHeadUrl(a),
					fr: t,
					icon_pre: r.getPreIconHtml(a.mParr_props, a),
					member_class: o.getMemberNameClass(a.mParr_props, a.free_flag),
					name: a.profession_manager_nick_name || a.name_show,
					icon_tbvip: r.getTbvipIconHtml(a.tb_vip),
					icon: r.getIconsHtml(a),
					sex: a.sex,
					tb_age: "-" == a.tb_age ? a.tb_age : a.tb_age + "\u5e74",
					post_num: a.post_num,
					good_num: a.good_num,
					honor: s.getMonthIcon(a.tbmall_month_icon, 2),
					honor_margin: this.getHonorMargin(),
					vip_tips: this.getVipTips(a),
					userId: a.id
				};
			a.is_verify && "0" !== a.is_verify && (c.verify_info = this.getVerifyHTML(a.identify_info));
			var d = "";
			a.tb_vip && a.tb_vip.type && (d = '<span class="userinfo_split"></span><span>\u7c89\u4e1d:' + a.followed_count + "</span>");
			var l = "",
				u = "",
				g = "";
			!a.marriage || 1 != a.marriage.status && 3 != a.marriage.status && 4 != a.marriage.status ? !a.marriage || 0 == a.marriage.length || 2 == a.marriage.status : (c.marriage_date = $.dateFormat(new Date(1e3 * a.marriage.time), "yyyy-MM-dd"), c.marriage_user_name = a.marriage.user_name, l = ['<div class="card_userinfo_marry clearfix">', '<span class="userinfo_marry_lover">\u7231\u4eba:#{marriage_user_name}</span>', "</div>"].join(""), u = ['<div class="card_userinfo_marry clearfix">', '<span class="userinfo_marry_date">\u7ed3\u5a5a\u7eaa\u5ff5\u65e5: #{marriage_date}</span>', "</div>"].join(""));
			var m = "";
			e || (m = '<div class="interaction_wrap interaction_wrap_theme2">' + g + '<a class="btn-small #{concernClass}" target="_blank" href="#" onclick="return false">#{concernText}</a><a class="btn-small btn-default" target="sixin" href="/im/pcmsg?from=#{userId}">\u79c1\u4fe1</a></div>');
			var v = $.tb.transforEmoji(a.name, a.name_show, !0),
				f = "";
			v.indexOf("activityTemp") > -1 && (f = '<div style="position:absolute;right:5px;background-color:#F5F7FA;"><div class="change_name" style="font-size: 12px;display:inline-block;height:20px;line-height:20px;margin-left:5px;float:left"><img src="//tb1.bdstatic.com/tb/cms/nickemoji/nickname_sign_ani.gif" style="height:12px;" /></div><a style="cursor:pointer" href="https://tieba.baidu.com/n/interact-web/nicknameActivity"><span style="font-size:12px;height:20px;line-height:20px;vertical-align:top;margin-left:5px">\u6211\u4e5f\u6539</span></a></div>');
			var p = ['<div class="card_headinfo_wrap" id="card_headinfo_wrap">', '<img class="card_userinfo_img" src="#{head_img}"/>', '<a class="card_userinfo_guide" target="_blank" href="/tbmall/propslist?category=113"></a>', m, "</div>", '<div class="card_userinfo_wrap clearfix">', '<div class="card_userinfo_left #{frameClass}">', '<div class="userinfo_head_wrap">', '<div class="userinfo_head" style="#{frameStyle}"></div>', '<a href="/home/main?un=#{un}&fr=#{fr}&ie=utf-8" class="j_avatar" target="_blank"><img src="#{portrait}"/></a>', "</div>", "</div>", '<div class="card_userinfo_middle">', '<div class="card_userinfo_title clearfix">', '#{icon_pre}<a href="/home/main?un=#{un}&fr=#{fr}&ie=utf-8" target="_blank" class="userinfo_username #{member_class}">' + v + "</a>#{icon_tbvip}", f, "</div>", l, '<div class="card_userinfo_num clearfix">', '<span class="userinfo_sex userinfo_sex_#{sex}"></span>', "<span>\u5427\u9f84:#{tb_age}</span>", '<span class="userinfo_split"></span>', "<span>\u53d1\u8d34:#{post_num}</span>", d, "</div>", u, '<div class="card_userinfo_tbvip clearfix">', "#{icon}", "</div>", "#{vip_tips}", "</div>", "</div>", "#{verify_info}"].join("");
			return $.tb.format(p, c)
		},
		getBtnGroup: function(e) {
			var a = "";
			if(e.id !== PageData.user.id) {
				var i = e.can_begcard,
					t = "";
				0 == i ? t = '<a class="btn_begcard j_begcard" href="#"></a>' : 1 == i ? t = '<a class="btn_begcard btn_forbidden">\u5df2\u7533\u8bf7</a>' : 2 == i && (t = '<a class="btn_begcard btn_forbidden">\u5df2\u4ea4\u6362</a>');
				var r = {
					private_msg: "//msg.baidu.com/ms?ct=21&cm=1&tn=bmSendMessage&un=" + encodeURIComponent(e.name),
					btn_begcard: t
				};
				a = ['<div class="card_btn_grounps">', '<a class="btn_privatemsg" target="_blank" href="#{private_msg}"></a>', "#{btn_begcard}", "</div>"].join(""), a = $.tb.format(a, r)
			}
			return a
		},
		getIcon: function(e) {
			var a = "";
			return e.identity && (a += '<span title="\u8d34\u5427\u5b9e\u540d\u8ba4\u8bc1" class="card_userinfo_icon card_icon_verify"></span>'), e.meizhi_level > 0 && (a += '<a href="/p/' + e.meizhi_thread_id + '" target="_blank" title="\u8d34\u5427\u59b9\u7eb8\u8ba4\u8bc1" class="card_userinfo_icon meizhi_vip card_icon_meizhi_vip' + e.meizhi_level + '"></a>'), a
		},
		getHonor: function(e) {
			if(e.novice) return '<div class="grade_level grade_level_novice" title="\u8d34\u5427\u83dc\u9e1f">\u8d34\u5427\u83dc\u9e1f</div>';
			var a = {
					manager: {
						title: "\u5427\u4e3b",
						level: 19
					},
					assist: {
						title: "\u5c0f\u5427\u4e3b",
						level: 20
					},
					picadmin: {
						title: "\u56fe\u7247\u5c0f\u7f16",
						level: 21
					},
					videoadmin: {
						title: "\u89c6\u9891\u5c0f\u7f16",
						level: 22
					},
					novice: {
						title: "\u83dc\u9e1f",
						level: 23
					}
				},
				i = e.manager,
				t = null,
				r = "",
				n = "";
			this.countLen = 0;
			for(var s in i) {
				t = i[s];
				var o = t.forum_list.join("\u3001"),
					_ = a[s];
				o = t.count > 2 ? o + "\u7b49\u5427" + _.title : o + "\u5427" + _.title, r += this.getHonorItem(_.level, t.count, o), this.countLen += String(t.count).length
			}
			var c = e.grade,
				d = [];
			for(var l in c) d.push(l);
			d.sort(function(e, a) {
				return a - e
			});
			for(var u = 0, g = d.length; g > u; u++) {
				t = c[d[u]];
				var o = t.forum_list.join("\u3001");
				t.count > 2 && (o += "\u5427\u7b49"), n += this.getHonorItem(d[u], t.count, o), this.countLen += String(t.count).length
			}
			return r + n
		},
		getHonorMargin: function() {
			var e = {
					2: "8px",
					3: "6px",
					4: "4px"
				},
				a = this.countLen - 4;
			return e[a] || ""
		},
		getHonorItem: function(e, a, i) {
			var t = {
					level: e,
					title: i,
					count: a
				},
				r = ['<div class="grade_level grade_level_#{level}" title="#{title}">', "<span>#{count}</span>", "</div>"].join("");
			return $.tb.format(r, t)
		},
		getVerifyHTML: function(e) {
			for(var a = {
					verify_reason: e[0] && e[0].v_reason,
					verify_forums: ""
				}, i = ['<div class="verify_wrap">', '<div class="verify_content">', '<div class="verify_desc">', "<span>\u5b98\u65b9\u8ba4\u8bc1\uff1a</span>", "<span>#{verify_reason}</span>", "</div>", '<div class="verify_forum">', '<a class="verify_home" href="//v.tieba.baidu.com/" target="_blank">\u7533\u8bf7\u4f01\u4e1a\u5b98\u65b9\u5427</a>', "<span>\u5165\u9a7b\u5427\uff1a</span>", "#{verify_forums}", "<span>\u5b98\u65b9\u5427\u4e3b</span>", "</div>", "</div>", "</div>"].join(""), t = 0; t < e.length; t++) a.verify_forums += this.getVForumItem(t, e[t].forum_name);
			return $.tb.format(i, a)
		},
		getVForumItem: function(e, a) {
			var i = "",
				t = {},
				r = [];
			return a.length > 5 ? (i = a.substring(0, 5), i += "...") : i = a, t = {
				index: e,
				verify_forum_name: i,
				origin_forum_name: encodeURIComponent(a)
			}, r = ['<span class="verify_forum_info">', '<a target="_blank" class="verify_forum_name_#{index}" href="/f?ie=utf-8&kw=#{origin_forum_name}">#{verify_forum_name}</a>', '<a target="_blank" href="//v.tieba.baidu.com/">', '<img class="verify_forum_icon" src="//tb2.bdstatic.com/tb/static-ihome/img/platform_blue_icon14.gif" alt="\u5b98\u65b9\u8ba4\u8bc1\u56fe\u6807" title="\u767e\u5ea6\u8d34\u5427\u5b98\u65b9\u5e73\u53f0\u8ba4\u8bc1">', "</a>", "</span>"].join(""), $.tb.format(r, t)
		},
		getVipTips: function(e) {
			var a = "",
				i = (new Date).getTime() / 1e3;
			return e.mParr_props && e.mParr_props.level && e.mParr_props.level.end_time > i && (a = '<p class="user_card_vip_tips"><a href="javascript:;" class="j_user_visit_card_joinvip" target="_blank">\u5f00\u901a\u4f1a\u5458</a>\u5c0a\u4eab\u6635\u79f0\u7ea2\u540d\u7279\u6743 <a href="/tbmall/tshow?tab=detail&c=15" target="_blank">\u4e86\u89e3\u7279\u6743</a> </p>'), a
		}
	}
}), _.Module.define({
	path: "user/widget/user_visit_card",
	requires: ["user/widget/user_visit_card/user_visit_card_base", "user/widget/interaction", "tbui/widget/card", "encourage-base/widget/post_marry"],
	sub: {
		_visit_card: null,
		_visit_card_ajax: null,
		_option: {
			width: 370
		},
		initial: function(e, a) {
			this.dataObj = e, this.dataObj.uname = this.dataObj.uname || PageData.user.name, this._wrap = e && e.wrapper || $("body"), this._util = this.requireInstance("user/widget/user_visit_card/user_visit_card_base"), this._interaction = this.requireInstance("user/widget/interaction"), a || this.bindEvents()
		},
		bindEvents: function() {
			var e = this;
			this._wrap.delegate(".j_user_card", "mouseenter", function() {
				return e.buildCard($(this)), !1
			}), this._wrap.delegate(".j_user_card", "mouseleave", function() {
				return e._visit_card_ajax && e._visit_card_ajax.abort(), e._visit_card && e._visit_card.closeCard({
					type: "delayClose",
					time: 200
				}), e._visit_card = null, !1
			}), this._wrap.delegate(".card_userinfo_close", "click", function() {
				return $("#user_visit_card").remove(), !1
			})
		},
		buildCard: function(e) {
			var a = this;
			a._visit_card && (a._visit_card.closeCard(), a._visit_card = null);
			var i = '<div class="user_card_loading"><img src="//tb2.bdstatic.com/tb/static-ihome/img/loading2.gif"/>\u6b63\u5728\u52a0\u8f7d\uff0c\u8bf7\u7a0d\u540e...</div>',
				t = {
					content: i,
					card_css: {
						width: a._option.width,
						zIndex: $.getcurzIndex()
					},
					auto_positon: !0,
					event_target: e,
					attr: "id='user_visit_card'",
					wrap: $("body")
				};
			a._visit_card = a.requireInstance("tbui/widget/card", t), a._visit_card.showCard({
				type: "delayShow",
				time: 200
			}), a.buildVisitCard(e)
		},
		getVisitCardContent: function(e) {
			var a = this,
				i = {
					ie: "utf-8"
				};
			e.un ? i.un = e.un : i.id = e.id, $.ajax({
				type: "get",
				url: "/home/get/panel",
				data: i,
				dataType: "json"
			}).success(function(i) {
				if(i && 0 === i.no) {
					var t = i.data;
					t.bg_id = e.bg_id;
					var r = a._util.getVisitCardTpl(1, t, !0);
					e.wrap.html(r)
				} else {
					var r = '<div class="user_card_loading">\u7f51\u7edc\u9519\u8bef<a href="#" id="user_card_reload" class="user_card_reload">\u5237\u65b0</a></div>';
					e.wrap.html(r)
				}
				e.callBack && $.isFunction(e.callBack) && e.callBack()
			})
		},
		buildVisitCard: function(e) {
			var a = this,
				i = {
					ie: "utf-8"
				};
			e.getData().un ? i.un = e.getData().un : i.id = e.getData().id, a._visit_card_ajax && a._visit_card_ajax.abort(), a._visit_card_ajax = $.ajax({
				type: "get",
				url: "/home/get/panel",
				data: i,
				dataType: "json"
			}).success(function(i) {
				if(i && 0 === i.no) {
					var t = i.data,
						r = t.name == a.dataObj.uname,
						n = a._util.getVisitCardTpl(r, t, !0);
					a._visit_card.setContent(n), a._visit_card._j_card.bindData({
						un: t.name
					}), a._visit_card.showCard(), a._interaction._resetDataObj({
						is_login: PageData.user.is_login,
						un: t.name,
						tbs: PageData.tbs
					}), a._visit_card._j_card.find(".j_user_visit_card_joinvip").on("click", function() {
						_.Module.use("encourage-member/widget/join_vip_dialog", [], function(e) {
							e.getMemberDialog()
						})
					}), a._visit_card._j_card.find("[j-user-visit-card-marriage-propose]").on("click", function() {
						var e = $(this);
						a.marryDialog = {}, a.marryDialog.hide = a.marryDialog.show = function() {};
						var i = e.tbattr("data-username");
						a.requireInstance("encourage-base/widget/post_marry", {
							type: "float",
							propose_name: i
						}, function(e) {
							a.marryDialog = e
						})
					}), $.stats.track("cardinfo", "ihome_v1")
				} else {
					var n = '<div class="user_card_loading">\u7f51\u7edc\u9519\u8bef<a href="#" id="user_card_reload" class="user_card_reload">\u5237\u65b0</a></div>';
					a._visit_card.setContent(n), $("#user_card_reload").on("click", function() {
						return a.buildCard(e), !1
					})
				}
			})
		},
		bindVisitCardEvent: function() {
			var e = this;
			e._visit_card.showCard({
				type: "delayShow",
				time: 200
			}), $.stats.track("cardinfo", "ihome_v1")
		}
	}
});
_.Module.define({
	path: "frs-list/widget/util_pop_video",
	sub: {
		_isFuckingIE: $.browser.msie && $.browser.version < 8,
		_videoSize: {
			min: {
				width: 440,
				height: 356
			},
			normal: {
				width: 534,
				height: 386
			},
			max: {
				width: 630,
				height: 481
			}
		},
		initial: function(i) {
			i = i || {}, this.config = i, this.popBoxTemplate = ['<div id="pop_video" class="dialogJshadow">', '<div class="pop_video_inner">', '<div class="pop_video_title">', '<span class="title_text">', "</span>", '<a rel="noreferrer"  href="#" class="j_pop_video_btn show pop_video_btn">&nbsp;</a>', "</div>", '<div class="pop_video_content">', '<video id="h5_video_play" controls loop src="#{src}" width="' + (i.width || this._videoSize.min.width) + '" height="' + (i.height || this._videoSize.min.height) + '"></video>', "</div>", "</div>", "</div>"].join(""), this._initEvent()
		},
		_resizeFlash: function(i) {
			$("#pop_video").find("#h5_video_play").tbattr(i || this._videoSize.min)
		},
		_initEvent: function() {
			var i = this;
			$("body").off("click.pop_video", ".media_box .j_pop_media").on("click.pop_video", ".media_box .j_pop_media", function(o) {
				var e = $(o.target).parents(".media_disp, .j_media_disp").find("video")[0];
				this.currentTime = e.currentTime, i.popBox($(this)), o.preventDefault()
			}), $("body").off("mousedown.pop_video", ".j_m_flash").on("mousedown.pop_video", ".j_m_flash", function() {
				i.unpopBox()
			}), $(window).off("resize.pop_video").on("resize.pop_video", function() {
				i._resize()
			})
		},
		unpopBox: function() {
			var i = $("#pop_video");
			i.remove(), this._isFuckingIE && $(window).off("scroll", this._scroll)
		},
		popBox: function(i) {
			$(".live_tv").hasClass("minimized") || $(".live_tv_btn").trigger("click");
			var o = this;
			o.unpopBox();
			var e = i.parents(".j_media_disp").find("video").tbattr("src"),
				t = i.parents(".j_thread_list").find(".threadlist_title a").html();
			t = $.tb.subByte(t, 50, "...");
			var n = this.popBoxTemplate.replace(/#{src}/, e);
			$("body").append(n), $(".j_retract_media").trigger("click");
			var s = $("#pop_video"),
				p = $("#h5_video_play")[0];
				
			p.currentTime = i[0].currentTime, p.play(), s.find(".pop_video_title").css("width", this._videoSize.min.width).find(".title_text").html(t), this.setPosition(), s.on("click", ".j_pop_video_btn", function(i) {
				o.unpopBox(), i.preventDefault()
			}),
			
			this._isFuckingIE ? $(window).on("scroll", this._scrollStop) : this.draggableObj = 1
		},
		setPosition: function(i, o) {
			var e = this,
				t = $("#pop_video");
			if(0 !== i & !i && 0 !== o && !o) {
				var n = $(document),
					s = $(window),
					p = e._isFuckingIE ? [n.scrollLeft(), n.scrollTop()] : [0, 0];
				i = p[0] + (s.width() - t.outerWidth() - 5), o = p[1] + (s.height() - t.outerHeight()) / 2, o = o >= 0 ? o : 0
			}
			t.css({
				left: i,
				top: o,
				right: "auto",
				bottom: "auto"
			})
		},
		_resize: function() {
			0 != $("#pop_video").length && this.setPosition()
		},
		_scrollStop: function() {
			$("#pop_video").css("top", $(document).scrollTop() + ($(window).height() - $("#pop_video").height()) / 2)
		}
	}
});